Possible fix for issue #2113

* closes #2113
This commit is contained in:
Franklin Sobrinho 2015-09-07 10:13:29 -03:00
parent b0aa49accb
commit b3e60585c2
1 changed files with 3 additions and 6 deletions

View File

@ -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();
}