From 9697ac1bece30bda6410a8dc33450b85a3358745 Mon Sep 17 00:00:00 2001 From: Maxim Nikolenko Date: Fri, 24 Mar 2023 16:22:57 +0200 Subject: SL-19335 update for switching in/out of Gallery view --- indra/newview/llpanelmaininventory.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'indra') diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index f430e44ec2..3679a22e5e 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -1382,10 +1382,7 @@ void LLPanelMainInventory::onViewModeClick() LLUUID new_root_folder; if(mSingleFolderMode) { - if(isListViewMode()) - { - selected_folder = mSingleFolderPanelInventory->getSingleFolderRoot(); - } + selected_folder = getCurrentSFVRoot(); } else { @@ -1419,7 +1416,7 @@ void LLPanelMainInventory::onViewModeClick() if (mSingleFolderMode && new_root_folder.notNull()) { setSingleFolderViewRoot(new_root_folder, true); - if(selected_folder.notNull()) + if(selected_folder.notNull() && isListViewMode()) { getActivePanel()->setSelection(selected_folder, TAKE_FOCUS_YES); } @@ -1485,9 +1482,17 @@ void LLPanelMainInventory::setSingleFolderViewRoot(const LLUUID& folder_id, bool if(clear_nav_history) { mSingleFolderPanelInventory->clearNavigationHistory(); - updateNavButtons(); } } + else if(isGalleryViewMode()) + { + mInventoryGalleryPanel->setRootFolder(folder_id); + if(clear_nav_history) + { + mInventoryGalleryPanel->clearNavigationHistory(); + } + } + updateNavButtons(); } LLUUID LLPanelMainInventory::getSingleFolderViewRoot() -- cgit v1.2.3