diff options
author | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2023-04-12 21:11:36 +0300 |
---|---|---|
committer | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2023-04-12 21:11:36 +0300 |
commit | 37530c9d736d90ec29b97e3567346a02e2826f97 (patch) | |
tree | ce6bbd2c701e9c0bc86a839918bc7f9801ddb4f9 /indra/newview/llpanelmaininventory.cpp | |
parent | c6d2bf93c02c6099f4c86a3379c3e82e21f9f37e (diff) |
SL-19544 WIP hide inventory pane in Combination view, if there is no visible items
Diffstat (limited to 'indra/newview/llpanelmaininventory.cpp')
-rw-r--r-- | indra/newview/llpanelmaininventory.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index dfcfc94cea..62b7a38857 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -1480,6 +1480,11 @@ void LLPanelMainInventory::setActivePanel() void LLPanelMainInventory::toggleViewMode() { + if(mSingleFolderMode && isCombinationViewMode()) + { + mCombinationInventoryPanel->getRootFolder()->setForceArrange(false); + } + mSingleFolderMode = !mSingleFolderMode; getChild<LLPanel>("default_inventory_panel")->setVisible(!mSingleFolderMode); @@ -2193,11 +2198,17 @@ void LLPanelMainInventory::updateCombinationVisibility() if(mSingleFolderMode && isCombinationViewMode()) { bool is_gallery_empty = !mCombinationGalleryPanel->hasVisibleItems(); + bool show_inv_pane = mCombinationInventoryPanel->hasVisibleItems() || is_gallery_empty; getChild<LLLayoutPanel>("comb_gallery_layout")->setVisible(!is_gallery_empty); + getChild<LLLayoutPanel>("comb_inventory_layout")->setVisible(show_inv_pane); + mCombinationInventoryPanel->getRootFolder()->setForceArrange(!show_inv_pane); + if(is_gallery_empty) { mCombinationGalleryPanel->handleModifiedFilter(); } + + getActivePanel()->getRootFolder(); } } @@ -2253,6 +2264,7 @@ void LLPanelMainInventory::setViewMode(EViewModeType mode) case MODE_COMBINATION: forward_history = mCombinationInventoryPanel->getNavForwardList(); backward_history = mCombinationInventoryPanel->getNavBackwardList(); + mCombinationInventoryPanel->getRootFolder()->setForceArrange(false); break; } |