summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShyRed <ShyRed@users.noreply.github.com>2018-03-10 14:21:17 +0100
committerShyRed <ShyRed@users.noreply.github.com>2018-03-10 14:21:17 +0100
commit188ccf190ba398ef9d3f661016f15cc005505c26 (patch)
tree889ca8472fa6f50842f8a641e1da355babfd6d2f
parentaeb1c67b5b55c769256a8ffc2f9d9095d6fc74da (diff)
Update preview on filesystem change
Check and recreate a file's preview, if it has changes to it in the filesystem.
-rw-r--r--editor/editor_file_system.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp
index dca32d7492..15aa2c3a0e 100644
--- a/editor/editor_file_system.cpp
+++ b/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
}