From 152010b8c6f0c5e6aec1cf56176d767f70205411 Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Wed, 9 Dec 2009 20:26:20 -0500 Subject: EXT-3063 cleanup of inventory item properties sidepanel step 1: kill the edit button step 2: disable info button on main inventory panel if more than one item is selected. other steps to be done will be filed as separate jiras code reviewed by seraph --HG-- branch : avatar-pipeline --- indra/newview/llsidepanelinventory.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'indra/newview/llsidepanelinventory.cpp') 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("panel_main_inventory"); + std::set selection_list; + panel_main_inventory->getActivePanel()->getRootFolder()->getSelectionList(selection_list); + return selection_list.size(); +} + LLInventoryPanel *LLSidepanelInventory::getActivePanel() { if (!getVisible()) -- cgit v1.2.3