diff options
author | Ovnuniarchos <pujalte.jorge@gmail.com> | 2018-08-16 07:22:18 +0200 |
---|---|---|
committer | Ovnuniarchos <pujalte.jorge@gmail.com> | 2018-08-16 07:22:18 +0200 |
commit | 9d0de7d417a87b46367b5dec1da7e93a9bc56408 (patch) | |
tree | d27d9f291e5ec6b6c0ad9e40047344c556efa646 /scene/gui | |
parent | 1c17c2b9b39d9c6e7440d25251ac8b1a1fede5bb (diff) |
PopupMenu item_pressed is sent before checking hide flags.
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 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) { |