summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatertools.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2011-03-09 11:24:54 -0500
committerLoren Shih <seraph@lindenlab.com>2011-03-09 11:24:54 -0500
commitc8293e29caf4701f130141a88b90709a09143d4e (patch)
treefc84848355f3c5d21e3fd6dd1ba2c5eade2d8c03 /indra/newview/llfloatertools.cpp
parent94b0ce6d842a1f34bd46535a8b4db68aa397a541 (diff)
parent76a325b83271424d231561d8ef099df1406c9517 (diff)
Automated merge up from viewer-development into mesh-development
Diffstat (limited to 'indra/newview/llfloatertools.cpp')
-rw-r--r--indra/newview/llfloatertools.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/indra/newview/llfloatertools.cpp b/indra/newview/llfloatertools.cpp
index bef830a93e..257970aaaf 100644
--- a/indra/newview/llfloatertools.cpp
+++ b/indra/newview/llfloatertools.cpp
@@ -221,6 +221,8 @@ BOOL LLFloaterTools::postBuild()
mRadioGroupEdit = getChild<LLRadioGroup>("edit_radio_group");
mBtnGridOptions = getChild<LLButton>("Options...");
mTitleMedia = getChild<LLMediaCtrl>("title_media");
+ mBtnLink = getChild<LLButton>("link_btn");
+ mBtnUnlink = getChild<LLButton>("unlink_btn");
mCheckSelectIndividual = getChild<LLCheckBoxCtrl>("checkbox edit linked parts");
getChild<LLUICtrl>("checkbox edit linked parts")->setValue((BOOL)gSavedSettings.getBOOL("EditLinkedParts"));
@@ -316,6 +318,9 @@ LLFloaterTools::LLFloaterTools(const LLSD& key)
mBtnRotateReset(NULL),
mBtnRotateRight(NULL),
+ mBtnLink(NULL),
+ mBtnUnlink(NULL),
+
mBtnDelete(NULL),
mBtnDuplicate(NULL),
mBtnDuplicateInPlace(NULL),
@@ -342,7 +347,7 @@ LLFloaterTools::LLFloaterTools(const LLSD& key)
mNeedMediaTitle(TRUE)
{
gFloaterTools = this;
-
+
setAutoFocus(FALSE);
mFactoryMap["General"] = LLCallbackMap(createPanelPermissions, this);//LLPanelPermissions
mFactoryMap["Object"] = LLCallbackMap(createPanelObject, this);//LLPanelObject
@@ -367,6 +372,9 @@ LLFloaterTools::LLFloaterTools(const LLSD& key)
mCommitCallbackRegistrar.add("BuildTool.DeleteMedia", boost::bind(&LLFloaterTools::onClickBtnDeleteMedia,this));
mCommitCallbackRegistrar.add("BuildTool.EditMedia", boost::bind(&LLFloaterTools::onClickBtnEditMedia,this));
+ mCommitCallbackRegistrar.add("BuildTool.LinkObjects", boost::bind(&LLSelectMgr::linkObjects, LLSelectMgr::getInstance()));
+ mCommitCallbackRegistrar.add("BuildTool.UnlinkObjects", boost::bind(&LLSelectMgr::unlinkObjects, LLSelectMgr::getInstance()));
+
}
LLFloaterTools::~LLFloaterTools()
@@ -623,6 +631,12 @@ void LLFloaterTools::updatePopup(LLCoordGL center, MASK mask)
bool linked_parts = gSavedSettings.getBOOL("EditLinkedParts");
getChildView("RenderingCost")->setVisible( !linked_parts && (edit_visible || focus_visible || move_visible) && sShowObjectCost);
+ mBtnLink->setVisible(edit_visible);
+ mBtnUnlink->setVisible(edit_visible);
+
+ mBtnLink->setEnabled(LLSelectMgr::instance().enableLinkObjects());
+ mBtnUnlink->setEnabled(LLSelectMgr::instance().enableUnlinkObjects());
+
if (mCheckSelectIndividual)
{
mCheckSelectIndividual->setVisible(edit_visible);