From cd759c773d45143648919e7c002dc65941c8790b Mon Sep 17 00:00:00 2001 From: Erik <35656626+SeleckyErik@users.noreply.github.com> Date: Mon, 15 Oct 2018 19:26:57 +0200 Subject: 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 --- editor/plugins/asset_library_editor_plugin.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'editor/plugins') 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) -- cgit v1.2.3