mirror of https://github.com/OpenTTD/OpenTTD
Since dropdown menus now get closed if they lose focus, 'instant close' dropdowns (i.e. the toolbar dropdowns) should no longer execute their action to avoid unintended actions.pull/11157/head
parent
5cd9c6d9a0
commit
1e1f1fada5
|
@ -203,7 +203,10 @@ struct DropdownWindow : Window {
|
|||
|
||||
void OnFocusLost(bool closing) override
|
||||
{
|
||||
if (!closing) this->Close();
|
||||
if (!closing) {
|
||||
this->instant_close = false;
|
||||
this->Close();
|
||||
}
|
||||
}
|
||||
|
||||
Point OnInitialPosition(int16 sm_width, int16 sm_height, int window_number) override
|
||||
|
|
Loading…
Reference in New Issue