mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-04 06:00:15 +00:00
(svn r16981) -Fix [FS#3062]: the last manually added server would not be saved
This commit is contained in:
parent
216ac43583
commit
63c29124de
@ -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;
|
||||
}
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user