summaryrefslogtreecommitdiff
path: root/src/station_gui.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-11-11 16:07:46 +0000
committerfrosch <frosch@openttd.org>2012-11-11 16:07:46 +0000
commitb998cbdff145cd005949b6a005f435a916b0ea06 (patch)
treee94ce652424a290b5feb66067ec8bdf18f9b36d0 /src/station_gui.cpp
parentcfccaff6457964db5245ac144e81b581146bfd75 (diff)
downloadopenttd-b998cbdff145cd005949b6a005f435a916b0ea06.tar.xz
(svn r24697) -Codechange: Use WDF_UNCLICK_BUTTONS instead of duplicating the same functionality.
Diffstat (limited to 'src/station_gui.cpp')
-rw-r--r--src/station_gui.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/station_gui.cpp b/src/station_gui.cpp
index 32aadbae7..48def98f3 100644
--- a/src/station_gui.cpp
+++ b/src/station_gui.cpp
@@ -535,8 +535,6 @@ public:
case WID_STL_SORTBY: // flip sorting method asc/desc
this->stations.ToggleSortOrder();
- this->SetTimeout();
- this->LowerWidget(WID_STL_SORTBY);
this->SetDirty();
break;
@@ -610,12 +608,6 @@ public:
}
}
- virtual void OnTimeout()
- {
- this->RaiseWidget(WID_STL_SORTBY);
- this->SetDirty();
- }
-
virtual void OnResize()
{
this->vscroll->SetCapacityFromWidget(this, WID_STL_LIST, WD_FRAMERECT_TOP + WD_FRAMERECT_BOTTOM);
@@ -705,7 +697,7 @@ static const NWidgetPart _nested_company_stations_widgets[] = {
NWidget(WWT_PANEL, COLOUR_GREY), SetDataTip(0x0, STR_NULL), SetResize(1, 0), SetFill(1, 1), EndContainer(),
EndContainer(),
NWidget(NWID_HORIZONTAL),
- NWidget(WWT_TEXTBTN, COLOUR_GREY, WID_STL_SORTBY), SetMinimalSize(81, 12), SetDataTip(STR_BUTTON_SORT_BY, STR_TOOLTIP_SORT_ORDER),
+ NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_STL_SORTBY), SetMinimalSize(81, 12), SetDataTip(STR_BUTTON_SORT_BY, STR_TOOLTIP_SORT_ORDER),
NWidget(WWT_DROPDOWN, COLOUR_GREY, WID_STL_SORTDROPBTN), SetMinimalSize(163, 12), SetDataTip(STR_SORT_BY_NAME, STR_TOOLTIP_SORT_CRITERIA), // widget_data gets overwritten.
NWidget(WWT_PANEL, COLOUR_GREY), SetDataTip(0x0, STR_NULL), SetResize(1, 0), SetFill(1, 1), EndContainer(),
EndContainer(),