aboutsummaryrefslogtreecommitdiff
path: root/editor/editor_file_system.cpp
diff options
context:
space:
mode:
authorShyRed2018-03-10 14:21:17 +0100
committerHein-Pieter van Braam2018-04-29 15:08:11 +0200
commit41f360f9c227ad238c9d350d08d02e8983b1d701 (patch)
treea5a5ad3a6c425990a780283baca2ab7b96f89793 /editor/editor_file_system.cpp
parent4ce6a8f5f9e108576b4924b5d3dc4486e841c734 (diff)
downloadgodot-41f360f9c227ad238c9d350d08d02e8983b1d701.tar.gz
godot-41f360f9c227ad238c9d350d08d02e8983b1d701.tar.zst
godot-41f360f9c227ad238c9d350d08d02e8983b1d701.zip
Update preview on filesystem change
Check and recreate a file's preview, if it has changes to it in the filesystem. (cherry picked from commit 188ccf190ba398ef9d3f661016f15cc005505c26)
Diffstat (limited to 'editor/editor_file_system.cpp')
-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 b11f1f71a..d8ae1da72 100644
--- a/editor/editor_file_system.cpp
+++ b/editor/editor_file_system.cpp
@@ -1355,6 +1355,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
}