From cff2509ecd06967c0d214dc0cf3d31c392091c99 Mon Sep 17 00:00:00 2001 From: Alexander Holland Date: Wed, 12 Aug 2015 22:24:21 +0200 Subject: [PATCH 1/2] close all parent PopupMenus fix --- scene/gui/popup_menu.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp index e706053592f..275965b372b 100644 --- a/scene/gui/popup_menu.cpp +++ b/scene/gui/popup_menu.cpp @@ -738,10 +738,18 @@ int PopupMenu::find_item_by_accelerator(uint32_t p_accel) const { void PopupMenu::activate_item(int p_item) { - ERR_FAIL_INDEX(p_item,items.size()); ERR_FAIL_COND(items[p_item].separator); emit_signal("item_pressed",items[p_item].ID); + + //hide all parent PopupMenue's + Node *next = get_parent(); + PopupMenu *pop = next->cast_to(); + while (pop) { + pop->hide(); + next = next->get_parent(); + pop = next->cast_to(); + } hide(); } From f6eff87793a3200e728bcc4dc33dc9c612d73036 Mon Sep 17 00:00:00 2001 From: Alexander Holland Date: Wed, 12 Aug 2015 22:35:37 +0200 Subject: [PATCH 2/2] update scene tabs on save - fix --- tools/editor/editor_node.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index b0a2c568de2..f51c4e8214d 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -918,6 +918,7 @@ void EditorNode::_save_scene(String p_file) { //EditorFileSystem::get_singleton()->update_file(p_file,sdata->get_type()); set_current_version(editor_data.get_undo_redo().get_version()); _update_title(); + _update_scene_tabs(); } else { _dialog_display_file_error(p_file,err); @@ -1323,7 +1324,6 @@ void EditorNode::_dialog_action(String p_file) { default: { //save scene? - if (file->get_mode()==FileDialog::MODE_SAVE_FILE) { //_save_scene(p_file);