diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp
index 6a9821083050f36057f70ca79015cb596a81d852..716a9143062addf405d463c4761015a41f57615e 100644
--- a/indra/newview/llpanellandmarks.cpp
+++ b/indra/newview/llpanellandmarks.cpp
@@ -661,7 +661,12 @@ void LLLandmarksPanel::onFoldingAction(const LLSD& userdata)
 	}
 	else if ("collapse_all" == command_name)
 	{
-		root_folder->closeAllFolders();
+		root_folder->setOpenArrangeRecursively(FALSE, LLFolderViewFolder::RECURSE_DOWN);
+
+		// The top level folder is invisible, it must be open to
+		// display its sub-folders.
+		root_folder->openTopLevelFolders();
+		root_folder->arrangeAll();
 	}
 	else if ( "sort_by_date" == command_name)
 	{