summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorErik <35656626+SeleckyErik@users.noreply.github.com>2018-10-15 19:26:57 +0200
committerErik <35656626+SeleckyErik@users.noreply.github.com>2018-10-15 19:26:57 +0200
commitcd759c773d45143648919e7c002dc65941c8790b (patch)
tree6786bdb362ad838348cb0f5c453cfa24cbf9cb91 /editor/plugins
parent4c863da4d5ad86f4c392d72dd9dbe24801884a71 (diff)
Hide header and footer in AssetLib when not necessary
Reduces visual clutter by hiding pages navigator header and footer in AssetLib if no results are found or when results fit on one page one page. Fix for issue #23036
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/asset_library_editor_plugin.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp
index 66770d98e5..138b8a491c 100644
--- a/editor/plugins/asset_library_editor_plugin.cpp
+++ b/editor/plugins/asset_library_editor_plugin.cpp
@@ -962,6 +962,9 @@ HBoxContainer *EditorAssetLibrary::_make_pages(int p_page, int p_page_count, int
HBoxContainer *hbc = memnew(HBoxContainer);
+ if (p_page_count < 2)
+ return hbc;
+
//do the mario
int from = p_page - 5;
if (from < 0)