diff options
author | alberth <alberth@openttd.org> | 2013-03-17 15:42:50 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2013-03-17 15:42:50 +0000 |
commit | d62ab47c7490f4c63d8d9fc97fe9aa55e4af0745 (patch) | |
tree | efbaa9abe7fa4d45659c08df080418bb576dce15 | |
parent | 15ec6e26f0ee98a3c8f53cdd7b146e3708467d18 (diff) | |
download | openttd-d62ab47c7490f4c63d8d9fc97fe9aa55e4af0745.tar.xz |
(svn r25095) -Codechange: Immediately save the sort order of the town directory instead of when closing the window.
-rw-r--r-- | src/town_gui.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/town_gui.cpp b/src/town_gui.cpp index afafc1fa0..c93fa6583 100644 --- a/src/town_gui.cpp +++ b/src/town_gui.cpp @@ -703,11 +703,6 @@ public: this->FinishInitNested(desc, 0); } - ~TownDirectoryWindow() - { - this->last_sorting = this->towns.GetListing(); - } - virtual void SetStringParameters(int widget) const { switch (widget) { @@ -826,6 +821,7 @@ public: switch (widget) { case WID_TD_SORT_ORDER: // Click on sort order button this->towns.ToggleSortOrder(); + this->last_sorting = this->towns.GetListing(); // Store new sorting order. this->SetDirty(); break; @@ -855,6 +851,7 @@ public: if (this->towns.SortType() != index) { this->towns.SetSortType(index); + this->last_sorting = this->towns.GetListing(); // Store new sorting order. this->BuildSortTownList(); } } |