summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskidd13 <skidd13@openttd.org>2008-05-27 20:33:44 +0000
committerskidd13 <skidd13@openttd.org>2008-05-27 20:33:44 +0000
commit49a0bd7f90f3c48f81e9ad0bcabe87a77cf36e0f (patch)
treebd28bc010abf67f9c4f6491c1009eedcfd0672c2
parent437d5d9798f523c29bfaae0a2849c471249a65b6 (diff)
downloadopenttd-49a0bd7f90f3c48f81e9ad0bcabe87a77cf36e0f.tar.xz
(svn r13299) -Fix (r13286): Stations sort type isn't updated correctly
-rw-r--r--src/station_gui.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/station_gui.cpp b/src/station_gui.cpp
index c60af1aef..b3598c8a2 100644
--- a/src/station_gui.cpp
+++ b/src/station_gui.cpp
@@ -202,11 +202,7 @@ protected:
/* Reset name sorter sort cache */
this->last_station = NULL;
- /* Display the current sort variant */
- this->widget[SLW_SORTDROPBTN].data = this->sorter_names[this->stations.SortType()];
-
- /* Set the modified widgets dirty */
- this->InvalidateWidget(SLW_SORTDROPBTN);
+ /* Set the modified widget dirty */
this->InvalidateWidget(SLW_LIST);
}
@@ -274,6 +270,8 @@ public:
this->stations.NeedResort();
this->SortStationsList();
+ this->widget[SLW_SORTDROPBTN].data = this->sorter_names[this->stations.SortType()];
+
this->FindWindowPlacementAndResize(desc);
}
@@ -501,6 +499,10 @@ public:
{
if (this->stations.SortType() != index) {
this->stations.SetSortType(index);
+
+ /* Display the current sort variant */
+ this->widget[SLW_SORTDROPBTN].data = this->sorter_names[this->stations.SortType()];
+
this->SetDirty();
}
}