diff options
Diffstat (limited to 'indra/newview/llfloatertools.cpp')
-rw-r--r-- | indra/newview/llfloatertools.cpp | 16 |
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); |