mirror of https://github.com/OpenTTD/OpenTTD
(svn r19118) -Fix [FS#3593]: Some buttons in the order gui were raised too soon.
parent
ff80df980a
commit
c1b40ee5e0
|
@ -1297,13 +1297,15 @@ public:
|
||||||
|
|
||||||
virtual void OnTimeout()
|
virtual void OnTimeout()
|
||||||
{
|
{
|
||||||
/* unclick all buttons except for the 'goto' button (ORDER_WIDGET_GOTO), which is 'persistent' */
|
static const int raise_widgets[] = {
|
||||||
for (uint i = 0; i < this->nested_array_size; i++) {
|
ORDER_WIDGET_SKIP, ORDER_WIDGET_DELETE, ORDER_WIDGET_REFIT, ORDER_WIDGET_SHARED_ORDER_LIST, WIDGET_LIST_END,
|
||||||
if (this->nested_array[i] != NULL && i != ORDER_WIDGET_GOTO &&
|
};
|
||||||
i != ORDER_WIDGET_SEL_TOP_LEFT && i != ORDER_WIDGET_SEL_TOP_MIDDLE && i != ORDER_WIDGET_SEL_TOP_RIGHT &&
|
|
||||||
i != ORDER_WIDGET_SEL_TOP_ROW && this->IsWidgetLowered(i)) {
|
/* Unclick all buttons in raise_widgets[]. */
|
||||||
this->RaiseWidget(i);
|
for (const int *widnum = raise_widgets; *widnum != WIDGET_LIST_END; widnum++) {
|
||||||
this->SetWidgetDirty(i);
|
if (this->IsWidgetLowered(*widnum)) {
|
||||||
|
this->RaiseWidget(*widnum);
|
||||||
|
this->SetWidgetDirty(*widnum);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue