diff options
author | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2023-03-02 20:54:33 +0200 |
---|---|---|
committer | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2023-03-02 20:54:33 +0200 |
commit | c74658b19b1ac28d5bf240e940a7ad97ff034e3c (patch) | |
tree | 8dce3617044b1af291a1ca62fffcb90baec17fe8 /indra/newview/llpanelmaininventory.cpp | |
parent | cf901b5abbe5c24da92c6c0320e3831a3798a539 (diff) |
SL-19310 Update navigation buttons in single-folder view
Diffstat (limited to 'indra/newview/llpanelmaininventory.cpp')
-rw-r--r-- | indra/newview/llpanelmaininventory.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index fd245a2b4d..1eb2d5bbdc 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -374,6 +374,10 @@ BOOL LLPanelMainInventory::handleKeyHere(KEY key, MASK mask) { startSearch(); } + if(mSingleFolderMode && key == KEY_LEFT) + { + onBackFolderClicked(); + } } return LLPanel::handleKeyHere(key, mask); @@ -1327,6 +1331,7 @@ void LLPanelMainInventory::setSingleFolderViewRoot(const LLUUID& folder_id, bool if(clear_nav_history) { mSingleFolderPanelInventory->clearNavigationHistory(); + updateNavButtons(); } } @@ -1756,6 +1761,17 @@ void LLPanelMainInventory::updateTitle() inventory_floater->setTitle(getString("inventory_title")); } } + updateNavButtons(); +} + +void LLPanelMainInventory::updateNavButtons() +{ + getChild<LLButton>("back_btn")->setEnabled(mSingleFolderPanelInventory->isBackwardAvailable()); + getChild<LLButton>("forward_btn")->setEnabled(mSingleFolderPanelInventory->isForwardAvailable()); + + const LLViewerInventoryCategory* cat = gInventory.getCategory(mSingleFolderPanelInventory->getSingleFolderRoot()); + bool up_enabled = (cat && cat->getParentUUID().notNull()); + getChild<LLButton>("up_btn")->setEnabled(up_enabled); } LLSidepanelInventory* LLPanelMainInventory::getParentSidepanelInventory() |