diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-08-27 20:18:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-27 20:18:36 +0200 |
commit | e28e7f54f8e696f73c4e3afad092d34cd57dc66f (patch) | |
tree | ea06bdb5f7e0f16348d3778000421b5da61cb33a | |
parent | 177a5988fffd960a760e683c370e68368e431260 (diff) | |
parent | 89c13c3ae92e52d839079cb9d26b794340002b7f (diff) |
Merge pull request #31719 from Calinou/assetlib-display-broken-icons
Display a "broken file" icon for missing images in the asset library
-rw-r--r-- | editor/plugins/asset_library_editor_plugin.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp index 3eea888950..ebcbe62e9d 100644 --- a/editor/plugins/asset_library_editor_plugin.cpp +++ b/editor/plugins/asset_library_editor_plugin.cpp @@ -404,7 +404,7 @@ void EditorAssetLibraryItemDownload::configure(const String &p_title, int p_asse icon->set_texture(p_preview); asset_id = p_asset_id; if (!p_preview.is_valid()) - icon->set_texture(get_icon("DefaultProjectIcon", "EditorIcons")); + icon->set_texture(get_icon("FileBrokenBigThumb", "EditorIcons")); host = p_download_url; sha256 = p_sha256_hash; _make_request(); @@ -770,7 +770,7 @@ void EditorAssetLibrary::_image_update(bool use_cache, bool final, const PoolByt } if (!image_set && final) { - obj->call("set_image", image_queue[p_queue_id].image_type, image_queue[p_queue_id].image_index, get_icon("DefaultProjectIcon", "EditorIcons")); + obj->call("set_image", image_queue[p_queue_id].image_type, image_queue[p_queue_id].image_index, get_icon("FileBrokenBigThumb", "EditorIcons")); } } } @@ -815,7 +815,7 @@ void EditorAssetLibrary::_image_request_completed(int p_status, int p_code, cons WARN_PRINTS("Error getting image file from URL: " + image_queue[p_queue_id].image_url); Object *obj = ObjectDB::get_instance(image_queue[p_queue_id].target); if (obj) { - obj->call("set_image", image_queue[p_queue_id].image_type, image_queue[p_queue_id].image_index, get_icon("DefaultProjectIcon", "EditorIcons")); + obj->call("set_image", image_queue[p_queue_id].image_type, image_queue[p_queue_id].image_index, get_icon("FileBrokenBigThumb", "EditorIcons")); } } |