summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorPedro J. Estébanez <pedrojrulez@gmail.com>2017-03-08 20:08:24 +0100
committerPedro J. Estébanez <pedrojrulez@gmail.com>2017-03-09 01:19:40 +0100
commit383dea5796d791c89678fe1aea384d42e9f3de8d (patch)
treed85137006d2b10e2b5af20b39b1163490d4cc886 /editor
parent616334311875da66e1a28a4d92efa1df245815c9 (diff)
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 00df0f337d..24d94c8d40 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;