summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-03-13 11:00:58 +0100
committerGitHub <noreply@github.com>2017-03-13 11:00:58 +0100
commit0f429f8f9eb2c2446957b4a97a06b67e616c9d43 (patch)
treef8ceb5b0539f424c83bc7358d78557ccb75db9cc /editor
parentc46004c5a343fbc5256af7df0d52ed52cf7721ca (diff)
parent383dea5796d791c89678fe1aea384d42e9f3de8d (diff)
Merge pull request #7979 from RandomShaper/fix-sub-inheritance
Fix node duplication in scene sub-inheritance
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_node.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index b74438f695..6a2222345a 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -925,6 +925,11 @@ void EditorNode::_save_scene(String p_file, int idx) {
return;
}
+ // force creation of node path cache
+ // (hacky but needed for the tree to update properly)
+ Node *dummy_scene = sdata->instance(PackedScene::GEN_EDIT_STATE_INSTANCE);
+ memdelete(dummy_scene);
+
int flg = 0;
if (EditorSettings::get_singleton()->get("filesystem/on_save/compress_binary_resources"))
flg |= ResourceSaver::FLAG_COMPRESS;