(svn r16981) -Fix [FS#3062]: the last manually added server would not be saved

This commit is contained in:
rubidium 2009-07-29 16:45:51 +00:00
parent 216ac43583
commit 63c29124de
2 changed files with 3 additions and 5 deletions

View File

@ -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;
}

View File

@ -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)