(svn r24697) -Codechange: Use WDF_UNCLICK_BUTTONS instead of duplicating the same functionality.
This commit is contained in:
@@ -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(),
|
||||
|
Reference in New Issue
Block a user