diff options
Diffstat (limited to 'indra/llui/llcheckboxctrl.cpp')
| -rw-r--r-- | indra/llui/llcheckboxctrl.cpp | 19 | 
1 files changed, 7 insertions, 12 deletions
| diff --git a/indra/llui/llcheckboxctrl.cpp b/indra/llui/llcheckboxctrl.cpp index 504b342003..b0a7e9d27f 100644 --- a/indra/llui/llcheckboxctrl.cpp +++ b/indra/llui/llcheckboxctrl.cpp @@ -75,7 +75,7 @@ LLCheckBoxCtrl::LLCheckBoxCtrl(const LLString& name, const LLRect& rect,  	}  	// must be big enough to hold all children -	setSpanChildren(TRUE); +	setUseBoundingRect(TRUE);  	mKeyboardFocusOnClick = TRUE; @@ -130,6 +130,7 @@ LLCheckBoxCtrl::LLCheckBoxCtrl(const LLString& name, const LLRect& rect,  		mButton->setDisabledImages( inactive_false_id, inactive_true_id );  		mButton->setHoverGlowStrength(0.35f);  	} +	mButton->setIsToggle(TRUE);  	mButton->setToggleState( initial_value );  	mButton->setFollowsLeft();  	mButton->setFollowsBottom(); @@ -150,16 +151,11 @@ void LLCheckBoxCtrl::onButtonPress( void *userdata )  	if (self->mRadioStyle)  	{ -		if (!self->getValue()) -		{ -			self->setValue(TRUE); -		} -	} -	else -	{ -		self->toggle(); +		self->setValue(TRUE);  	} +  	self->setControlValue(self->getValue()); +	// HACK: because buttons don't normally commit  	self->onCommit();  	if (self->mKeyboardFocusOnClick) @@ -232,14 +228,13 @@ void LLCheckBoxCtrl::draw()  //virtual  void LLCheckBoxCtrl::setValue(const LLSD& value )  { -	mSetValue = value.asBoolean(); -	mButton->setToggleState( mSetValue ); +	mButton->setValue( value );  }  //virtual  LLSD LLCheckBoxCtrl::getValue() const  { -	return mButton->getToggleState(); +	return mButton->getValue();  }  void LLCheckBoxCtrl::setLabel( const LLStringExplicit& label ) | 
