summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelmaininventory.cpp
diff options
context:
space:
mode:
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