summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2023-02-24 21:17:05 +0200
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2023-02-24 21:17:05 +0200
commitcebfc02d6f1deee4e0a8eafd444e9657a2a86807 (patch)
tree08043d7571e91c940c0e6cda2414c281fd3c7b0b /scene/gui
parent6296b46008fb8d8e5cb9b60af05fa1ea26b8f600 (diff)
Revert "Reordering emitted signals in PopupMenu" and fix editor selection issue in the safer way.
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/popup_menu.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp
index cf73729c0a..1a6adca121 100644
--- a/scene/gui/popup_menu.cpp
+++ b/scene/gui/popup_menu.cpp
@@ -1715,12 +1715,12 @@ void PopupMenu::activate_item(int p_item) {
need_hide = false;
}
- emit_signal(SNAME("id_pressed"), id);
- emit_signal(SNAME("index_pressed"), p_item);
-
if (need_hide) {
hide();
}
+
+ emit_signal(SNAME("id_pressed"), id);
+ emit_signal(SNAME("index_pressed"), p_item);
}
void PopupMenu::remove_item(int p_idx) {