diff options
author | Hein-Pieter van Braam <hp@tmm.cx> | 2018-08-16 21:51:41 +0200 |
---|---|---|
committer | Hein-Pieter van Braam <hp@tmm.cx> | 2018-08-16 21:51:41 +0200 |
commit | 2d032c1562a5779f48bed92f2d51dbb9cd0791ec (patch) | |
tree | 589b030ea41f2a29687455ef4a2bff1690f26476 | |
parent | 968b31e971da8040d939a38dcdfbc3445100daa8 (diff) |
Call minimum_size_changed() in PopupMenu::remove_item()
When removing an item from a PopupMenu we need to update the control's
size cache otherwise the size of the PopupMenu itself lags behind by 1
item size. Meaning the PopupMenu will remain too large.
-rw-r--r-- | scene/gui/popup_menu.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp index e81813d7a5..c486b732ea 100644 --- a/scene/gui/popup_menu.cpp +++ b/scene/gui/popup_menu.cpp @@ -1099,6 +1099,7 @@ void PopupMenu::remove_item(int p_idx) { items.remove(p_idx); update(); + minimum_size_changed(); } void PopupMenu::add_separator(const String &p_text) { |