Mercurial > hg > openttd
changeset 12543:ea54644136d4 draft
(svn r16981) -Fix [FS#3062]: the last manually added server would not be saved
author | rubidium <rubidium@openttd.org> |
---|---|
date | Wed, 29 Jul 2009 16:45:51 +0000 |
parents | caf9d539f945 |
children | d89416689463 |
files | src/network/network_gamelist.cpp src/network/network_gui.cpp |
diffstat | 2 files changed, 3 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/network/network_gamelist.cpp +++ b/src/network/network_gamelist.cpp @@ -52,6 +52,7 @@ item->online = false; } item->manually |= ins_item->manually; + if (item->manually) NetworkRebuildHostList(); UpdateNetworkGameWindow(false); } free(ins_item); @@ -118,6 +119,7 @@ remove = NULL; DEBUG(net, 4, "[gamelist] removed server from list"); + NetworkRebuildHostList(); UpdateNetworkGameWindow(false); return; }
--- a/src/network/network_gui.cpp +++ b/src/network/network_gui.cpp @@ -691,7 +691,6 @@ if (this->server != NULL) { if (keycode == WKC_DELETE) { // Press 'delete' to remove servers NetworkGameListRemoveItem(this->server); - NetworkRebuildHostList(); this->server = NULL; this->list_pos = SLP_INVALID; } @@ -712,10 +711,7 @@ virtual void OnQueryTextFinished(char *str) { - if (!StrEmpty(str)) { - NetworkAddServer(str); - NetworkRebuildHostList(); - } + if (!StrEmpty(str)) NetworkAddServer(str); } virtual void OnResize(Point delta)