summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMaxim Nikolenko <maximnproductengine@lindenlab.com>2023-03-24 16:22:57 +0200
committerMaxim Nikolenko <maximnproductengine@lindenlab.com>2023-03-24 16:22:57 +0200
commit9697ac1bece30bda6410a8dc33450b85a3358745 (patch)
tree30aaa6ba123b3cb140a2a77b2b8b7f17fda4147d /indra
parent3605d3164d83b966c5c4a330713092d05e8e5698 (diff)
SL-19335 update for switching in/out of Gallery view
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llpanelmaininventory.cpp17
1 files changed, 11 insertions, 6 deletions
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()