From 7dd08303a3ebf9718c2c60a4d94b81d5d7845f8c Mon Sep 17 00:00:00 2001 From: Jon Wolk Date: Wed, 19 Dec 2007 00:56:59 +0000 Subject: svn merge -r 75354:76103 svn+ssh://svn.lindenlab.com/svn/linden/branches/voice-group-moderation-3 -> release. Finished product of QAR-134 --- indra/llui/llcheckboxctrl.cpp | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'indra/llui/llcheckboxctrl.cpp') 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 ) -- cgit v1.2.3