From 41f360f9c227ad238c9d350d08d02e8983b1d701 Mon Sep 17 00:00:00 2001 From: ShyRed Date: Sat, 10 Mar 2018 14:21:17 +0100 Subject: [PATCH] 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) --- editor/editor_file_system.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp index b11f1f71a8f..d8ae1da72e9 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 }