summaryrefslogtreecommitdiff
path: root/indra/newview/llsidepanelinventory.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2009-12-14 10:39:59 -0500
committerLoren Shih <seraph@lindenlab.com>2009-12-14 10:39:59 -0500
commitaad8d99af2b4a29d055dccb1c3fbea7a46fcb843 (patch)
tree96b398bd405344f42753e58afbb02092882715cb /indra/newview/llsidepanelinventory.cpp
parent3e75137f26c099185677e1160570860e07a56595 (diff)
parenta763409647a5a8d82f2f1c54223b998877c3b72d (diff)
automated merge viewer2.0->viewer2.0
Diffstat (limited to 'indra/newview/llsidepanelinventory.cpp')
-rw-r--r--indra/newview/llsidepanelinventory.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp
index ca7a3b663a..5383158cd3 100644
--- a/indra/newview/llsidepanelinventory.cpp
+++ b/indra/newview/llsidepanelinventory.cpp
@@ -235,8 +235,10 @@ void LLSidepanelInventory::updateVerbs()
if (!item)
return;
- mInfoBtn->setEnabled(TRUE);
- mShareBtn->setEnabled(TRUE);
+ bool is_single_selection = getSelectedCount() == 1;
+
+ mInfoBtn->setEnabled(is_single_selection);
+ mShareBtn->setEnabled(is_single_selection);
switch(item->getInventoryType())
{
@@ -274,6 +276,14 @@ LLInventoryItem *LLSidepanelInventory::getSelectedItem()
return item;
}
+U32 LLSidepanelInventory::getSelectedCount()
+{
+ LLPanelMainInventory *panel_main_inventory = mInventoryPanel->getChild<LLPanelMainInventory>("panel_main_inventory");
+ std::set<LLUUID> selection_list;
+ panel_main_inventory->getActivePanel()->getRootFolder()->getSelectionList(selection_list);
+ return selection_list.size();
+}
+
LLInventoryPanel *LLSidepanelInventory::getActivePanel()
{
if (!getVisible())