Merge pull request #2362 from AlexHolly/update-scene-tab-fix

[UI-FIX] - Update scene tabs on save
This commit is contained in:
Juan Linietsky 2015-10-17 10:51:45 -03:00
commit c22b627ee3
2 changed files with 10 additions and 2 deletions

View File

@ -740,10 +740,18 @@ int PopupMenu::find_item_by_accelerator(uint32_t p_accel) const {
void PopupMenu::activate_item(int p_item) { void PopupMenu::activate_item(int p_item) {
ERR_FAIL_INDEX(p_item,items.size()); ERR_FAIL_INDEX(p_item,items.size());
ERR_FAIL_COND(items[p_item].separator); ERR_FAIL_COND(items[p_item].separator);
emit_signal("item_pressed",items[p_item].ID); emit_signal("item_pressed",items[p_item].ID);
//hide all parent PopupMenue's
Node *next = get_parent();
PopupMenu *pop = next->cast_to<PopupMenu>();
while (pop) {
pop->hide();
next = next->get_parent();
pop = next->cast_to<PopupMenu>();
}
hide(); hide();
} }

View File

@ -976,6 +976,7 @@ void EditorNode::_save_scene(String p_file) {
//EditorFileSystem::get_singleton()->update_file(p_file,sdata->get_type()); //EditorFileSystem::get_singleton()->update_file(p_file,sdata->get_type());
set_current_version(editor_data.get_undo_redo().get_version()); set_current_version(editor_data.get_undo_redo().get_version());
_update_title(); _update_title();
_update_scene_tabs();
} else { } else {
_dialog_display_file_error(p_file,err); _dialog_display_file_error(p_file,err);
@ -1399,7 +1400,6 @@ void EditorNode::_dialog_action(String p_file) {
} break; } break;
default: { //save scene? default: { //save scene?
if (file->get_mode()==FileDialog::MODE_SAVE_FILE) { if (file->get_mode()==FileDialog::MODE_SAVE_FILE) {
//_save_scene(p_file); //_save_scene(p_file);