From f90bcb3a55a0e61f3dbf068c3ddea86b6d5f519f Mon Sep 17 00:00:00 2001 From: Todd Stinson Date: Thu, 29 Mar 2012 15:00:29 -0700 Subject: PATH-442: BUGFIX Disabling the phantom flag in the Build Tools floater for character objects. --- indra/newview/llpanelobject.cpp | 18 ++++++++++++++---- indra/newview/llpanelobject.h | 1 + indra/newview/skins/default/xui/en/floater_tools.xml | 12 ++++++++++-- 3 files changed, 25 insertions(+), 6 deletions(-) (limited to 'indra/newview') 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("Permanent Checkbox Ctrl"); + // Character checkbox + mCheckCharacter = getChild("Character Checkbox Ctrl"); // Position mLabelPosition = getChild("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 ); diff --git a/indra/newview/llpanelobject.h b/indra/newview/llpanelobject.h index b606ef5044..307d63aada 100644 --- a/indra/newview/llpanelobject.h +++ b/indra/newview/llpanelobject.h @@ -153,6 +153,7 @@ protected: LLCheckBoxCtrl *mCheckTemporary; LLCheckBoxCtrl *mCheckPhantom; LLCheckBoxCtrl *mCheckPermanent; + LLCheckBoxCtrl *mCheckCharacter; LLTextureCtrl *mCtrlSculptTexture; LLTextBox *mLabelSculptType; diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index 0f390217d1..528d2a7064 100644 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -1362,15 +1362,23 @@ even though the user gets a free copy. name="Permanent Checkbox Ctrl" top_pad="0" width="123" /> + - Position (meters) -- cgit v1.2.3