summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorNong Van Tinh <vannongtinh@gmail.com>2023-02-17 23:18:56 +0700
committerNong Van Tinh <vannongtinh@gmail.com>2023-02-17 23:18:56 +0700
commit5928d801a9855620dddd236725d0680963d9eaf3 (patch)
tree485ad4761e280088b5284222e3731816451cb154 /scene/gui
parentc7aadab155a6e3d3d5445465f3d6eda18a31d2e4 (diff)
Reordering emitted signals in PopupMenu
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 1a6adca121..cf73729c0a 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) {