From 68d09255bdb47a143fb8ef09314301ac3fecaa58 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. (cherry picked from commit 2d032c1562a5779f48bed92f2d51dbb9cd0791ec) --- 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 289a9837f2a..b07709941e1 100644 --- a/scene/gui/popup_menu.cpp +++ b/scene/gui/popup_menu.cpp @@ -1033,6 +1033,7 @@ void PopupMenu::remove_item(int p_idx) { items.remove(p_idx); update(); + minimum_size_changed(); } void PopupMenu::add_separator() {