diff options
author | Yuri Sizov <11782833+YuriSizov@users.noreply.github.com> | 2023-02-17 21:17:01 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-17 21:17:01 +0300 |
commit | 6bb4b00647326c971f61c5fd6ff0b7064a01120b (patch) | |
tree | 5b8f2b40f6458049fe8223dfc980b9fded08bbfd /scene/gui | |
parent | 28db611f0f27c37d2d02fc986e9edbb8a8725267 (diff) | |
parent | 5928d801a9855620dddd236725d0680963d9eaf3 (diff) |
Merge pull request #73508 from nongvantinh/reorder-emitted-signals
Reordering emitted signals in PopupMenu
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/popup_menu.cpp | 6 |
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) { |