Editor properly reloads scenes if they changed on disk or were reimported

This commit is contained in:
Juan Linietsky
2016-06-28 18:53:31 -03:00
parent 5065e46381
commit fbdb7a947b
4 changed files with 88 additions and 5 deletions
+4
View File
@@ -565,6 +565,8 @@ bool EditorData::check_and_update_scene(int p_idx) {
bool must_reload = _find_updated_instances(edited_scene[p_idx].root,edited_scene[p_idx].root,checked_scenes);
print_line("MUST RELOAD? "+itos(must_reload));
if (must_reload) {
Ref<PackedScene> pscene;
pscene.instance();
@@ -762,6 +764,8 @@ Ref<ResourceImportMetadata> EditorData::get_edited_scene_import_metadata() const
return edited_scene[current_edited_scene].medatata;
}
void EditorData::clear_edited_scenes() {
for(int i=0;i<edited_scene.size();i++) {