summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-07-29 16:45:51 +0000
committerrubidium <rubidium@openttd.org>2009-07-29 16:45:51 +0000
commit63c29124de3fc65b5238243b4800c4646a5cf82b (patch)
tree461ab886d6520b4eba5c716435aa122cf5585b9b /src
parent216ac43583ae4c3e2e78f811cde40e24d7388be6 (diff)
downloadopenttd-63c29124de3fc65b5238243b4800c4646a5cf82b.tar.xz
(svn r16981) -Fix [FS#3062]: the last manually added server would not be saved
Diffstat (limited to 'src')
-rw-r--r--src/network/network_gamelist.cpp2
-rw-r--r--src/network/network_gui.cpp6
2 files changed, 3 insertions, 5 deletions
diff --git a/src/network/network_gamelist.cpp b/src/network/network_gamelist.cpp
index 71f8be968..552e2f635 100644
--- a/src/network/network_gamelist.cpp
+++ b/src/network/network_gamelist.cpp
@@ -52,6 +52,7 @@ static void NetworkGameListHandleDelayedInsert()
item->online = false;
}
item->manually |= ins_item->manually;
+ if (item->manually) NetworkRebuildHostList();
UpdateNetworkGameWindow(false);
}
free(ins_item);
@@ -118,6 +119,7 @@ void NetworkGameListRemoveItem(NetworkGameList *remove)
remove = NULL;
DEBUG(net, 4, "[gamelist] removed server from list");
+ NetworkRebuildHostList();
UpdateNetworkGameWindow(false);
return;
}
diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp
index 0293b64c8..1470d75b3 100644
--- a/src/network/network_gui.cpp
+++ b/src/network/network_gui.cpp
@@ -691,7 +691,6 @@ public:
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 @@ public:
virtual void OnQueryTextFinished(char *str)
{
- if (!StrEmpty(str)) {
- NetworkAddServer(str);
- NetworkRebuildHostList();
- }
+ if (!StrEmpty(str)) NetworkAddServer(str);
}
virtual void OnResize(Point delta)