Browse Source

Merge pull request #23037 from SeleckyErik/issue-23036

Hide header and footer in AssetLib when not necessary
Rémi Verschelde 7 years ago
parent
commit
0d8284d3d4
1 changed files with 3 additions and 0 deletions
  1. 3 0
      editor/plugins/asset_library_editor_plugin.cpp

+ 3 - 0
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)