summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2020-02-23 20:55:55 +0100
committerHugo Locurcio <hugo.locurcio@hugo.pro>2020-02-23 23:27:42 +0100
commit5dd851e8494cb57214e551194d3732f95e4f25eb (patch)
tree1d641f30aa343311a66ceaacebe1fd7aa986297d
parenta920f9727a29c854dcc7f193f691f02aad15d94d (diff)
Mention version compatibility when there are no results in the assetlib
This closes #36469.
-rw-r--r--editor/plugins/asset_library_editor_plugin.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp
index 01c3c33995..c8cbc59e45 100644
--- a/editor/plugins/asset_library_editor_plugin.cpp
+++ b/editor/plugins/asset_library_editor_plugin.cpp
@@ -1210,7 +1210,16 @@ void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const
library_vb->add_child(asset_bottom_page);
if (result.empty()) {
- library_error->set_text(vformat(TTR("No results for \"%s\"."), filter->get_text()));
+ if (filter->get_text() != String()) {
+ library_error->set_text(
+ vformat(TTR("No results for \"%s\"."), filter->get_text()));
+ } else {
+ // No results, even though the user didn't search for anything specific.
+ // This is typically because the version number changed recently
+ // and no assets compatible with the new version have been published yet.
+ library_error->set_text(
+ vformat(TTR("No results compatible with %s %s."), String(VERSION_SHORT_NAME).capitalize(), String(VERSION_BRANCH)));
+ }
library_error->show();
}