diff options
author | Anchor Linden <anchor@lindenlab.com> | 2018-03-21 01:40:35 -0700 |
---|---|---|
committer | Anchor Linden <anchor@lindenlab.com> | 2018-03-21 01:40:35 -0700 |
commit | f33541443532551f58ff0b16560ec4af398e520f (patch) | |
tree | 040f9340b40bef83abdb16185f0f5842d4a3e2c0 /indra/newview/llpanelface.cpp | |
parent | ac558e384214e22b4a8da2045854e2180b7428bf (diff) |
fixed MAINT-8413,8409,8408
Diffstat (limited to 'indra/newview/llpanelface.cpp')
-rw-r--r-- | indra/newview/llpanelface.cpp | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp index 363fe3da04..5689c44e21 100644 --- a/indra/newview/llpanelface.cpp +++ b/indra/newview/llpanelface.cpp @@ -880,10 +880,21 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) getChildView("maskcutoff")->setEnabled(editable && mIsAlpha); getChildView("label maskcutoff")->setEnabled(editable && mIsAlpha); - if (LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 1) + bool allAttachments = true; + for (LLObjectSelection::iterator iter = LLSelectMgr::getInstance()->getSelection()->begin(); + iter != LLSelectMgr::getInstance()->getSelection()->end();iter++) { - texture_ctrl->setBakeTextureEnabled(objectp->isAttachment()); + LLSelectNode* node = *iter; + LLViewerObject* object = node->getObject(); + if (!object->isAttachment()) + { + allAttachments = false; + break; + } } + + texture_ctrl->setBakeTextureEnabled(allAttachments); + } else if (id.isNull()) { @@ -895,6 +906,8 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) getChildView("label alphamode")->setEnabled(FALSE); getChildView("maskcutoff")->setEnabled(FALSE); getChildView("label maskcutoff")->setEnabled(FALSE); + + texture_ctrl->setBakeTextureEnabled(false); } else { @@ -907,10 +920,20 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/) getChildView("maskcutoff")->setEnabled(editable && mIsAlpha); getChildView("label maskcutoff")->setEnabled(editable && mIsAlpha); - if (LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 1) + bool allAttachments = true; + for (LLObjectSelection::iterator iter = LLSelectMgr::getInstance()->getSelection()->begin(); + iter != LLSelectMgr::getInstance()->getSelection()->end();iter++) { - texture_ctrl->setBakeTextureEnabled(objectp->isAttachment()); + LLSelectNode* node = *iter; + LLViewerObject* object = node->getObject(); + if (!object->isAttachment()) + { + allAttachments = false; + break; + } } + + texture_ctrl->setBakeTextureEnabled(allAttachments); } } |