From b3e60585c23bea1787ce3553408927d68edb25b0 Mon Sep 17 00:00:00 2001 From: Franklin Sobrinho Date: Mon, 7 Sep 2015 10:13:29 -0300 Subject: [PATCH] Possible fix for issue #2113 * closes #2113 --- tools/editor/scene_tree_dock.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tools/editor/scene_tree_dock.cpp b/tools/editor/scene_tree_dock.cpp index 276f2dea33a..55c34ebc874 100644 --- a/tools/editor/scene_tree_dock.cpp +++ b/tools/editor/scene_tree_dock.cpp @@ -1211,24 +1211,21 @@ void SceneTreeDock::_create() { } - String newname=n->get_name(); n->replace_by(newnode,true); - if (n==edited_scene) { edited_scene=newnode; editor->set_edited_scene(newnode); } - - - editor_data->get_undo_redo().clear_history(); - memdelete(n); newnode->set_name(newname); + editor->push_item(newnode); + memdelete(n); + _update_tool_buttons(); }