diff options
author | volzhs <volzhs@gmail.com> | 2017-01-30 04:27:14 +0900 |
---|---|---|
committer | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-02-02 08:24:52 +0100 |
commit | 86a04198d96820b853bec79165b738a841142768 (patch) | |
tree | d036357d07579dfcb97c477760465fbdf1e52846 /tools/editor | |
parent | b602096b9b5a31ff0e8ac0123a0210189179bbc6 (diff) |
Fix crash when saving root node by "Save Branch as Scene" with unsaved scene
Fix #7667
(cherry picked from commit 43a2599801be348dfd41d928c7a66a590dbe8745)
Diffstat (limited to 'tools/editor')
-rw-r--r-- | tools/editor/scene_tree_dock.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/editor/scene_tree_dock.cpp b/tools/editor/scene_tree_dock.cpp index ea1de29d0f..ae7a80377d 100644 --- a/tools/editor/scene_tree_dock.cpp +++ b/tools/editor/scene_tree_dock.cpp @@ -649,6 +649,13 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { Node *tocopy = selection.front()->get(); + if (tocopy==scene){ + accept->get_ok()->set_text(TTR("I see..")); + accept->set_text(TTR("Can not perform with the root node.")); + accept->popup_centered_minsize(); + break; + } + if (tocopy!=editor_data->get_edited_scene_root() && tocopy->get_filename()!="") { accept->get_ok()->set_text(TTR("I see..")); accept->set_text(TTR("This operation can't be done on instanced scenes.")); |