diff options
author | Juan Linietsky <reduzio@gmail.com> | 2018-08-16 08:17:12 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-16 08:17:12 -0300 |
commit | b466561c4ae91555ba96928944ba69876fef1b44 (patch) | |
tree | 2d791b4a840d60fd80543bb5aeba5db58718b2be | |
parent | af93842f937270f5e25cd7270fba1cde18cd21c9 (diff) | |
parent | 9d0de7d417a87b46367b5dec1da7e93a9bc56408 (diff) |
Merge pull request #21062 from Ovnuniarchos/PopupCheckables
PopupMenu item_pressed is sent before checking hide flags.
-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 cdc6b868ec..e81813d7a5 100644 --- a/scene/gui/popup_menu.cpp +++ b/scene/gui/popup_menu.cpp @@ -1071,6 +1071,9 @@ void PopupMenu::activate_item(int p_item) { pop = Object::cast_to<PopupMenu>(next); } + emit_signal("id_pressed", id); + emit_signal("index_pressed", p_item); + // Hides popup by default; unless otherwise specified // by using set_hide_on_item_selection and set_hide_on_checkable_item_selection @@ -1084,9 +1087,6 @@ void PopupMenu::activate_item(int p_item) { return; hide(); - - emit_signal("id_pressed", id); - emit_signal("index_pressed", p_item); } void PopupMenu::remove_item(int p_idx) { |