Changeset - r19815:f6f84e811034
[Not reviewed]
master
0 1 0
frosch - 12 years ago 2012-11-27 21:54:11
frosch@openttd.org
(svn r24770) -Fix-ish: Calling GUIList::Sort repeatedly has no use without GUIList::NeedResort since the latter has the sideeffects.
1 file changed with 2 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/network/network_gui.cpp
Show inline comments
 
@@ -593,13 +593,15 @@ public:
 

	
 
	virtual void OnPaint()
 
	{
 
		if (this->servers.NeedRebuild()) {
 
			this->BuildGUINetworkGameList();
 
		}
 
		if (this->servers.NeedResort()) {
 
		this->SortNetworkGameList();
 
		}
 

	
 
		NetworkGameList *sel = this->server;
 
		/* 'Refresh' button invisible if no server selected */
 
		this->SetWidgetDisabledState(WID_NG_REFRESH, sel == NULL);
 
		/* 'Join' button disabling conditions */
 
		this->SetWidgetDisabledState(WID_NG_JOIN, sel == NULL || // no Selected Server
0 comments (0 inline, 0 general)