summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelmaininventory.cpp
diff options
context:
space:
mode:
authorMaxim Nikolenko <maximnproductengine@lindenlab.com>2023-05-10 12:51:08 +0300
committerMaxim Nikolenko <maximnproductengine@lindenlab.com>2023-05-10 12:51:08 +0300
commit8a1cb8c00cf75ff1e09c72c2fb487728ec77c66b (patch)
tree02513f1ba4793148b52587fc58ff30b046e8cf98 /indra/newview/llpanelmaininventory.cpp
parent06f63d9b871458f71340ba7d0126bf964d17048f (diff)
SL-19697 FIXED Clicking on inventory item in list view does not unselect item in gallery view
Diffstat (limited to 'indra/newview/llpanelmaininventory.cpp')
-rw-r--r--indra/newview/llpanelmaininventory.cpp21
1 files changed, 20 insertions, 1 deletions
diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp
index 4577c1defa..a8c8ce994d 100644
--- a/indra/newview/llpanelmaininventory.cpp
+++ b/indra/newview/llpanelmaininventory.cpp
@@ -262,7 +262,7 @@ BOOL LLPanelMainInventory::postBuild()
LLInventoryFilter& comb_inv_filter = mCombinationInventoryPanel->getFilter();
comb_inv_filter.setFilterThumbnails(LLInventoryFilter::FILTER_EXCLUDE_THUMBNAILS);
comb_inv_filter.markDefault();
- mCombinationInventoryPanel->setSelectCallback(boost::bind(&LLPanelMainInventory::onSelectionChange, this, mCombinationInventoryPanel, _1, _2));
+ mCombinationInventoryPanel->setSelectCallback(boost::bind(&LLPanelMainInventory::onCombinationInventorySelectionChanged, this, _1, _2));
mCombinationInventoryPanel->setRootChangedCallback(boost::bind(&LLPanelMainInventory::onCombinationRootChanged, this, false));
mCombinationGalleryPanel = getChild<LLInventoryGallery>("comb_gallery_view_inv");
@@ -270,6 +270,7 @@ BOOL LLPanelMainInventory::postBuild()
comb_gallery_filter.setFilterThumbnails(LLInventoryFilter::FILTER_ONLY_THUMBNAILS);
comb_gallery_filter.markDefault();
mCombinationGalleryPanel->setRootChangedCallback(boost::bind(&LLPanelMainInventory::onCombinationRootChanged, this, true));
+ mCombinationGalleryPanel->setSelectionChangeCallback(boost::bind(&LLPanelMainInventory::onCombinationGallerySelectionChanged, this, _1));
mCombinationScroller = getChild<LLView>("combination_scroller");
@@ -2296,6 +2297,24 @@ void LLPanelMainInventory::onCombinationRootChanged(bool gallery_clicked)
mCombinationInventoryPanel->reshape(1, 1);
}
+void LLPanelMainInventory::onCombinationGallerySelectionChanged(const LLUUID& category_id)
+{
+ if(category_id != LLUUID::null)
+ {
+ mCombinationInventoryPanel->unSelectAll();
+ }
+}
+
+void LLPanelMainInventory::onCombinationInventorySelectionChanged(const std::deque<LLFolderViewItem*>& items, BOOL user_action)
+{
+ onSelectionChange(mCombinationInventoryPanel, items, user_action);
+
+ if(!items.empty())
+ {
+ mCombinationGalleryPanel->clearSelection();
+ }
+}
+
void LLPanelMainInventory::updateCombinationVisibility()
{
if(mSingleFolderMode