diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2018-12-06 20:31:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-06 20:31:08 +0100 |
commit | ce3f3a9f82545b71a819c32e2c134a55d9d564f2 (patch) | |
tree | 2c0e123891f70ad09dd56d4f450bbf31cb25fc45 /editor/editor_file_dialog.cpp | |
parent | f2e7a650c7c23a7ec5c9dbf43ef605885e26d60e (diff) | |
parent | 68e69fd45b03f2c75a1314cef5cfe014e1432c00 (diff) |
Merge pull request #24194 from bojidar-bg/23567-fix-message-queue-overflow
Make thumbnail cache less tasking on the message queue
Diffstat (limited to 'editor/editor_file_dialog.cpp')
-rw-r--r-- | editor/editor_file_dialog.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp index b39f910182..81d9442656 100644 --- a/editor/editor_file_dialog.cpp +++ b/editor/editor_file_dialog.cpp @@ -830,11 +830,12 @@ void EditorFileDialog::update_file_list() { d["name"] = files.front()->get(); d["dir"] = false; String fullpath = cdir.plus_file(files.front()->get()); + d["path"] = fullpath; + item_list->set_item_metadata(item_list->get_item_count() - 1, d); + if (display_mode == DISPLAY_THUMBNAILS) { EditorResourcePreview::get_singleton()->queue_resource_preview(fullpath, this, "_thumbnail_result", fullpath); } - d["path"] = fullpath; - item_list->set_item_metadata(item_list->get_item_count() - 1, d); if (file->get_text() == files.front()->get()) item_list->set_current(item_list->get_item_count() - 1); |