summaryrefslogtreecommitdiff
path: root/indra/newview/llsidepaneltaskinfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llsidepaneltaskinfo.cpp')
-rw-r--r--indra/newview/llsidepaneltaskinfo.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/indra/newview/llsidepaneltaskinfo.cpp b/indra/newview/llsidepaneltaskinfo.cpp
index 0630981d7e..6ebe55e362 100644
--- a/indra/newview/llsidepaneltaskinfo.cpp
+++ b/indra/newview/llsidepaneltaskinfo.cpp
@@ -100,6 +100,8 @@ BOOL LLSidepanelTaskInfo::postBuild()
mPayBtn->setClickedCallback(boost::bind(&LLSidepanelTaskInfo::onPayButtonClicked, this));
mBuyBtn = getChild<LLButton>("buy_btn");
mBuyBtn->setClickedCallback(boost::bind(&LLSidepanelTaskInfo::onBuyButtonClicked, this));
+ mDetailsBtn = getChild<LLButton>("details_btn");
+ mDetailsBtn->setClickedCallback(boost::bind(&LLSidepanelTaskInfo::onDetailsButtonClicked, this));
mLabelGroupName = getChild<LLNameBox>("Group Name Proxy");
@@ -1122,6 +1124,15 @@ void LLSidepanelTaskInfo::updateVerbs()
//mEditBtn->setEnabled(obj && obj->permModify());
*/
+ LLSafeHandle<LLObjectSelection> object_selection = LLSelectMgr::getInstance()->getSelection();
+ const BOOL multi_select = (object_selection->getNumNodes() > 1);
+
+ mOpenBtn->setVisible(!multi_select);
+ mPayBtn->setVisible(!multi_select);
+ mBuyBtn->setVisible(!multi_select);
+ mDetailsBtn->setVisible(multi_select);
+ mDetailsBtn->setEnabled(multi_select);
+
mOpenBtn->setEnabled(enable_object_open());
mPayBtn->setEnabled(enable_pay_object());
mBuyBtn->setEnabled(enable_buy_object());
@@ -1145,6 +1156,11 @@ void LLSidepanelTaskInfo::onBuyButtonClicked()
doClickAction(CLICK_ACTION_BUY);
}
+void LLSidepanelTaskInfo::onDetailsButtonClicked()
+{
+ LLFloaterReg::showInstance("inspect", LLSD());
+}
+
// virtual
void LLSidepanelTaskInfo::save()
{