diff options
author | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2023-04-06 19:51:08 +0300 |
---|---|---|
committer | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2023-04-06 19:54:22 +0300 |
commit | cc39c1e852b1b8ad0e6dc2bb7907b8116c716c1d (patch) | |
tree | 24c5cc73c59e1539997b8b784292efa3c6bbc751 /indra/newview/llpanelmaininventory.cpp | |
parent | 0d12b5f637fb2bbf335a28c93dd6eaf416e71c95 (diff) |
SL-19544 preparation for Combination view
Diffstat (limited to 'indra/newview/llpanelmaininventory.cpp')
-rw-r--r-- | indra/newview/llpanelmaininventory.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index 79b41f8e5f..7d7a92de81 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -1421,6 +1421,7 @@ void LLPanelMainInventory::toggleViewMode() getChild<LLPanel>("default_inventory_panel")->setVisible(!mSingleFolderMode); getChild<LLPanel>("single_folder_inventory")->setVisible(mSingleFolderMode && isListViewMode()); getChild<LLPanel>("gallery_view_inventory")->setVisible(mSingleFolderMode && isGalleryViewMode()); + getChild<LLPanel>("combination_view_inventory")->setVisible(mSingleFolderMode && isCombinationViewMode()); getChild<LLLayoutPanel>("nav_buttons")->setVisible(mSingleFolderMode); getChild<LLButton>("view_mode_btn")->setImageOverlay(mSingleFolderMode ? getString("default_mode_btn") : getString("single_folder_mode_btn")); @@ -1823,6 +1824,10 @@ void LLPanelMainInventory::onCustomAction(const LLSD& userdata) { setViewMode(MODE_GALLERY); } + if (command_name == "combination_view") + { + setViewMode(MODE_COMBINATION); + } } void LLPanelMainInventory::onVisibilityChange( BOOL new_visibility ) @@ -2042,7 +2047,7 @@ BOOL LLPanelMainInventory::isActionChecked(const LLSD& userdata) } if (command_name == "combination_view") { - return false; + return isCombinationViewMode(); } return FALSE; @@ -2127,6 +2132,7 @@ void LLPanelMainInventory::setViewMode(EViewModeType mode) getChild<LLPanel>("single_folder_inventory")->setVisible(mSingleFolderMode && isListViewMode()); getChild<LLPanel>("gallery_view_inventory")->setVisible(mSingleFolderMode && isGalleryViewMode()); + getChild<LLPanel>("combination_view_inventory")->setVisible(mSingleFolderMode && isCombinationViewMode()); if(isListViewMode()) { @@ -2166,6 +2172,11 @@ LLUUID LLPanelMainInventory::getCurrentSFVRoot() { return mInventoryGalleryPanel->getRootFolder(); } + if(isCombinationViewMode()) + { + //todo: should get actual Combination view root + return mSingleFolderPanelInventory->getSingleFolderRoot(); + } return LLUUID::null; } |