From 2d032c1562a5779f48bed92f2d51dbb9cd0791ec Mon Sep 17 00:00:00 2001 From: Hein-Pieter van Braam Date: Thu, 16 Aug 2018 21:51:41 +0200 Subject: [PATCH] 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. --- scene/gui/popup_menu.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp index e81813d7a58..c486b732ea9 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) {