From 383dea5796d791c89678fe1aea384d42e9f3de8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20J=2E=20Est=C3=A9banez?= Date: Wed, 8 Mar 2017 20:08:24 +0100 Subject: Fix node duplication in scene sub-inheritance --- editor/editor_node.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'editor') 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; -- cgit v1.2.3