(svn r22099) [1.1] -Backport from trunk:

- Fix: Remove invalid keycodes when reading hotkeys.cfg [FS#4510] (r22094)
- Fix: The server list did not get sorted with one item in it, so the 'position in the list' variable was never updated causing problems when using the keyboard shortcuts for scrolling [FS#4514] (r22093)
- Fix: When deleting towns, only relocate objects during DC_EXEC (r22087)
This commit is contained in:
rubidium
2011-02-18 20:35:40 +00:00
parent 177135320d
commit fab07a9265
5 changed files with 26 additions and 8 deletions
+6 -1
View File
@@ -347,7 +347,12 @@ protected:
/** Sort the server list */
void SortNetworkGameList()
{
if (!this->servers.Sort()) return;
bool did_sort = this->servers.Sort();
/* In case of 0 or 1 servers there is no sorting, thus this->list_pos
* isn't set to a "sane" value. So, we only take the short way out
* when we did not (re)sort and we have a valid this->list_pos, or
* there are no servers to actually select. */
if (!did_sort && (this->list_pos != SLP_INVALID || this->servers.Length() == 0)) return;
/* After sorting ngl->sort_list contains the sorted items. Put these back
* into the original list. Basically nothing has changed, we are only