diff options
author | Jon Wolk <jwolk@lindenlab.com> | 2007-12-19 00:56:59 +0000 |
---|---|---|
committer | Jon Wolk <jwolk@lindenlab.com> | 2007-12-19 00:56:59 +0000 |
commit | 7dd08303a3ebf9718c2c60a4d94b81d5d7845f8c (patch) | |
tree | 6195a8585cc7998647afcaec2167e728e4abd3c1 /indra/llui/llcheckboxctrl.cpp | |
parent | 4d87303e78c1accde85b217b325e0c08930b0c4c (diff) |
svn merge -r 75354:76103 svn+ssh://svn.lindenlab.com/svn/linden/branches/voice-group-moderation-3 -> release. Finished product of QAR-134
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 ) |