summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2017-06-27 20:52:02 +0100
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2017-06-27 20:52:02 +0100
commit0b57379b127b9ef5f925f52176544ac8f447ce1f (patch)
treec41ce941becc9783289e1d64da64f1a031028952
parent7af46e7fe37552175c46a9366e9574bb9c716a68 (diff)
SL-722 - animated mesh checkbox inactive unless there's a single object or linkset, all volumes
-rw-r--r--indra/newview/llpanelvolume.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp
index 5e87c174d6..c5fbc1f71b 100644
--- a/indra/newview/llpanelvolume.cpp
+++ b/indra/newview/llpanelvolume.cpp
@@ -266,6 +266,8 @@ void LLPanelVolume::getState( )
BOOL editable = root_objectp->permModify() && !root_objectp->isPermanentEnforced();
BOOL single_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME )
&& LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 1;
+ BOOL single_root_volume = LLSelectMgr::getInstance()->selectionAllPCode( LL_PCODE_VOLUME ) &&
+ LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() == 1;
// Select Single Message
if (single_volume)
@@ -355,7 +357,7 @@ void LLPanelVolume::getState( )
}
// Animated Mesh
- BOOL is_animated_mesh = root_volobjp && root_volobjp->isAnimatedObject();
+ BOOL is_animated_mesh = single_root_volume && root_volobjp && root_volobjp->isAnimatedObject();
getChild<LLUICtrl>("Animated Mesh Checkbox Ctrl")->setValue(is_animated_mesh);
// AXON FIXME CHECK FOR SKIN INFO ALSO
// WHAT ABOUT isPermanentEnforced?
@@ -363,7 +365,7 @@ void LLPanelVolume::getState( )
BOOL enabled_animated_object_box = FALSE;
if (root_volobjp && root_volobjp == volobjp)
{
- enabled_animated_object_box = root_volobjp && root_volobjp->canBeAnimatedObject() && editable;
+ enabled_animated_object_box = single_root_volume && root_volobjp && root_volobjp->canBeAnimatedObject() && editable;
}
getChildView("Animated Mesh Checkbox Ctrl")->setEnabled(enabled_animated_object_box);