diff options
author | Paul Trojahn <paul.trojahn@gmail.com> | 2019-03-02 13:33:54 +0100 |
---|---|---|
committer | Paul Trojahn <paul.trojahn@gmail.com> | 2019-03-02 13:43:29 +0100 |
commit | 6e865d1e11be5f2e289b85c0f1392d868f8478fe (patch) | |
tree | ea9afda75534ff3971ab3d524913ebdd99488697 /editor/editor_file_dialog.cpp | |
parent | b69569415f6a3c7e8d15c6f58775260eba2bc09d (diff) | |
download | redot-engine-6e865d1e11be5f2e289b85c0f1392d868f8478fe.tar.gz |
Fix preview in file dialog
If the preview is already cached, queue_ressource_preview calls
_thumbnail_done immediately, so preview_waiting is never set to false
again. The progress wheel isn't rendered, because the WaitPreview icons
don't exist. This should probably be Progress.
Fixes #25749
Diffstat (limited to 'editor/editor_file_dialog.cpp')
-rw-r--r-- | editor/editor_file_dialog.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp index 765a330aaf..cdc06503e9 100644 --- a/editor/editor_file_dialog.cpp +++ b/editor/editor_file_dialog.cpp @@ -75,7 +75,7 @@ void EditorFileDialog::_notification(int p_what) { preview_wheel_index++; if (preview_wheel_index >= 8) preview_wheel_index = 0; - Ref<Texture> frame = get_icon("WaitPreview" + itos(preview_wheel_index + 1), "EditorIcons"); + Ref<Texture> frame = get_icon("Progress" + itos(preview_wheel_index + 1), "EditorIcons"); preview->set_texture(frame); preview_wheel_timeout = 0.1; } @@ -323,11 +323,10 @@ void EditorFileDialog::_request_single_thumbnail(const String &p_path) { if (!FileAccess::exists(p_path)) return; - EditorResourcePreview::get_singleton()->queue_resource_preview(p_path, this, "_thumbnail_done", p_path); - set_process(true); preview_waiting = true; preview_wheel_timeout = 0; + EditorResourcePreview::get_singleton()->queue_resource_preview(p_path, this, "_thumbnail_done", p_path); } void EditorFileDialog::_action_pressed() { |