Fix dec7ff6b0c: Dropdowns couldn't be closed by pressing the parent button. (#10954)

Since dropdowns self-close, the detection of re-clicking a dropdown
button no longer worked, as the dropdown is already closed.

Instead set (and then test) a flag on the parent widget to indicate that
the dropdown closed. This method avoids looping windows on every click.
This commit is contained in:
PeterN
2023-06-07 19:01:30 +01:00
committed by GitHub
parent b2a8d8aea4
commit b49bd86a46
4 changed files with 11 additions and 29 deletions

View File

@@ -15,7 +15,4 @@
/* Show drop down menu containing a fixed list of strings */
void ShowDropDownMenu(Window *w, const StringID *strings, int selected, int button, uint32 disabled_mask, uint32 hidden_mask, uint width = 0);
/* Hide drop down menu of a parent window */
int HideDropDownMenu(Window *pw);
#endif /* WIDGETS_DROPDOWN_FUNC_H */