summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelvolume.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2017-09-18 19:51:44 +0100
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2017-09-18 19:51:44 +0100
commit3346281be35ab6fa3a46c7f166bb1f7da066d5e3 (patch)
treead68173772e4ff86977e48dc4992cf24b907f592 /indra/newview/llpanelvolume.cpp
parente360423598002893f5735b9898a565c8d159d1f8 (diff)
SL-790 - Adding UI checks for actions that would increase the animated object attachment count
Diffstat (limited to 'indra/newview/llpanelvolume.cpp')
-rw-r--r--indra/newview/llpanelvolume.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp
index c5fbc1f71b..6a71da3918 100644
--- a/indra/newview/llpanelvolume.cpp
+++ b/indra/newview/llpanelvolume.cpp
@@ -78,6 +78,8 @@
#include "llviewercontrol.h"
#include "llmeshrepository.h"
+#include "llvoavatarself.h"
+
#include <boost/bind.hpp>
// "Features" Tab
@@ -366,6 +368,12 @@ void LLPanelVolume::getState( )
if (root_volobjp && root_volobjp == volobjp)
{
enabled_animated_object_box = single_root_volume && root_volobjp && root_volobjp->canBeAnimatedObject() && editable;
+ if (enabled_animated_object_box && !is_animated_mesh &&
+ root_volobjp->isAttachment() && !gAgentAvatarp->canAttachMoreAnimatedObjects())
+ {
+ // Turning this attachment animated would cause us to exceed the limit.
+ enabled_animated_object_box = false;
+ }
}
getChildView("Animated Mesh Checkbox Ctrl")->setEnabled(enabled_animated_object_box);