Browse Source

Update preview on filesystem change

Check and recreate a file's preview, if it has changes to it in the filesystem.
ShyRed 7 years ago
parent
commit
188ccf190b
1 changed files with 3 additions and 0 deletions
  1. 3 0
      editor/editor_file_system.cpp

+ 3 - 0
editor/editor_file_system.cpp

@@ -1316,6 +1316,9 @@ void EditorFileSystem::update_file(const String &p_file) {
 	fs->files[cpos]->deps = _get_dependencies(p_file);
 	fs->files[cpos]->import_valid = ResourceLoader::is_import_valid(p_file);
 
+	// Update preview
+	EditorResourcePreview::get_singleton()->check_for_invalidation(p_file);
+
 	call_deferred("emit_signal", "filesystem_changed"); //update later
 }