summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelobject.cpp
diff options
context:
space:
mode:
authorTodd Stinson <stinson@lindenlab.com>2012-03-29 15:00:29 -0700
committerTodd Stinson <stinson@lindenlab.com>2012-03-29 15:00:29 -0700
commitf90bcb3a55a0e61f3dbf068c3ddea86b6d5f519f (patch)
tree712e596bcfd2c4bdac764a3dc6ff4ba9ee1baad4 /indra/newview/llpanelobject.cpp
parent7948df474c770ec4223d06e759d5f11278f88dac (diff)
PATH-442: BUGFIX Disabling the phantom flag in the Build Tools floater for character objects.
Diffstat (limited to 'indra/newview/llpanelobject.cpp')
-rw-r--r--indra/newview/llpanelobject.cpp18
1 files changed, 14 insertions, 4 deletions
diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp
index 2e41aa8002..028ca82fed 100644
--- a/indra/newview/llpanelobject.cpp
+++ b/indra/newview/llpanelobject.cpp
@@ -124,6 +124,8 @@ BOOL LLPanelObject::postBuild()
// Permanent checkbox
mCheckPermanent = getChild<LLCheckBoxCtrl>("Permanent Checkbox Ctrl");
+ // Character checkbox
+ mCheckCharacter = getChild<LLCheckBoxCtrl>("Character Checkbox Ctrl");
// Position
mLabelPosition = getChild<LLTextBox>("label position");
@@ -503,29 +505,35 @@ void LLPanelObject::getState( )
BOOL is_flexible = volobjp && volobjp->isFlexible();
BOOL is_permanent = root_objectp->flagObjectPermanent();
BOOL is_permanent_enforced = root_objectp->isPermanentEnforced();
+ BOOL is_character = root_objectp->flagCharacter();
+ llassert(!is_permanent || !is_character); // should never have a permanent object that is also a character
// Physics checkbox
mIsPhysical = root_objectp->flagUsePhysics();
- //llassert(is_permanent && mIsPhysical); // should never has a permanent object that is also physical
+ llassert(!is_permanent || !mIsPhysical); // should never have a permanent object that is also physical
+ llassert(!is_character || mIsPhysical); // all characters should also be physical
mCheckPhysics->set( mIsPhysical );
mCheckPhysics->setEnabled( roots_selected>0
&& (editable || gAgent.isGodlike())
- && !is_flexible && !is_permanent);
+ && !is_flexible && !is_permanent && !is_character);
mIsTemporary = root_objectp->flagTemporaryOnRez();
- //llassert(is_permanent && mIsTemporary); // should never has a permanent object that is also temporary
+ llassert(!is_permanent || !mIsTemporary); // should never has a permanent object that is also temporary
mCheckTemporary->set( mIsTemporary );
mCheckTemporary->setEnabled( roots_selected>0 && editable && !is_permanent);
mIsPhantom = root_objectp->flagPhantom();
+ llassert(!is_character || !mIsPhantom); // should never have a character that is also a phantom
mCheckPhantom->set( mIsPhantom );
- mCheckPhantom->setEnabled( roots_selected>0 && editable && !is_flexible && !is_permanent_enforced );
+ mCheckPhantom->setEnabled( roots_selected>0 && editable && !is_flexible && !is_permanent_enforced && !is_character);
mCheckPermanent->set(is_permanent);
mCheckPermanent->setEnabled(FALSE);
+ mCheckCharacter->set(is_character);
+ mCheckCharacter->setEnabled(FALSE);
//----------------------------------------------------------------------------
@@ -1880,6 +1888,8 @@ void LLPanelObject::clearCtrls()
mCheckPhantom ->setEnabled( FALSE );
mCheckPermanent ->set(FALSE);
mCheckPermanent ->setEnabled( FALSE );
+ mCheckCharacter ->set(FALSE);
+ mCheckCharacter ->setEnabled( FALSE );
// Disable text labels
mLabelPosition ->setEnabled( FALSE );