diff options
author | Igor Borovkov <iborovkov@productengine.com> | 2009-12-14 17:11:15 +0200 |
---|---|---|
committer | Igor Borovkov <iborovkov@productengine.com> | 2009-12-14 17:11:15 +0200 |
commit | c1b31cd97accfbd67f12ffbdff41f61ba9a01843 (patch) | |
tree | e13a5e68523f6ee2889b8eaf81a8bdc81844a77a /indra/newview/llsidepanelinventory.cpp | |
parent | 222dfaef0aa16ced2fd6285763467e5bfa8ed574 (diff) | |
parent | c159d9165dda268f3d8d16e95dac81bc8a9e12be (diff) |
merge
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llsidepanelinventory.cpp')
-rw-r--r-- | indra/newview/llsidepanelinventory.cpp | 14 |
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()) |