diff options
author | Christian Goetze <cg@lindenlab.com> | 2007-08-21 22:17:53 +0000 |
---|---|---|
committer | Christian Goetze <cg@lindenlab.com> | 2007-08-21 22:17:53 +0000 |
commit | ce0a5fe14590b8d675b885fccd5f79d7ea17a302 (patch) | |
tree | 3388e6f8ff02292ec4521d278c841801462945b8 /indra/llui/llcheckboxctrl.cpp | |
parent | b699ae454d8477d19342d320758cd993d1d28cec (diff) |
EFFECTIVE MERGE: svn merge -r 66133:68118 svn+ssh://svn/svn/linden/branches/maintenance into release
Actual action: branched maintenance-r68118, merged in release, then copied result into release
Diffstat (limited to 'indra/llui/llcheckboxctrl.cpp')
-rw-r--r-- | indra/llui/llcheckboxctrl.cpp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/indra/llui/llcheckboxctrl.cpp b/indra/llui/llcheckboxctrl.cpp index 6c181acc94..318268bdb6 100644 --- a/indra/llui/llcheckboxctrl.cpp +++ b/indra/llui/llcheckboxctrl.cpp @@ -39,7 +39,8 @@ LLCheckBoxCtrl::LLCheckBoxCtrl(const LLString& name, const LLRect& rect, mTextEnabledColor( LLUI::sColorsGroup->getColor( "LabelTextColor" ) ), mTextDisabledColor( LLUI::sColorsGroup->getColor( "LabelDisabledColor" ) ), mRadioStyle( use_radio_style ), - mInitialValue( initial_value ) + mInitialValue( initial_value ), + mSetValue( initial_value ) { if (font) { @@ -208,7 +209,8 @@ void LLCheckBoxCtrl::draw() //virtual void LLCheckBoxCtrl::setValue(const LLSD& value ) { - mButton->setToggleState( value.asBoolean() ); + mSetValue = value.asBoolean(); + mButton->setToggleState( mSetValue ); } //virtual @@ -249,16 +251,27 @@ void LLCheckBoxCtrl::setControlName(const LLString& control_name, LLView* contex // virtual Returns TRUE if the user has modified this control. -BOOL LLCheckBoxCtrl::isDirty() +BOOL LLCheckBoxCtrl::isDirty() const { if ( mButton ) { - return mButton->isDirty(); + return (mSetValue != mButton->getToggleState()); } return FALSE; // Shouldn't get here } +// virtual Clear dirty state +void LLCheckBoxCtrl::resetDirty() +{ + if ( mButton ) + { + mSetValue = mButton->getToggleState(); + } +} + + + // virtual LLXMLNodePtr LLCheckBoxCtrl::getXML(bool save_children) const { |