diff options
| author | Yuri Chebotarev <ychebotarev@productengine.com> | 2009-11-26 09:31:55 +0200 |
|---|---|---|
| committer | Yuri Chebotarev <ychebotarev@productengine.com> | 2009-11-26 09:31:55 +0200 |
| commit | 4c81e7a85c3fe69f16ac3996df732627dda8533a (patch) | |
| tree | 25af0dff630ae8d5cbf5e572c8286122ebaf79a7 /indra/llui/llsliderctrl.cpp | |
| parent | 1533f3d2a6fcbfd1550b3840c2d2327283f131c0 (diff) | |
| parent | b19b63ad8cba7b1c3e44c4084313103765af1917 (diff) | |
merge
--HG--
branch : product-engine
Diffstat (limited to 'indra/llui/llsliderctrl.cpp')
| -rw-r--r-- | indra/llui/llsliderctrl.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/indra/llui/llsliderctrl.cpp b/indra/llui/llsliderctrl.cpp index ed22c0a47f..01c274bb4e 100644 --- a/indra/llui/llsliderctrl.cpp +++ b/indra/llui/llsliderctrl.cpp @@ -122,7 +122,8 @@ LLSliderCtrl::LLSliderCtrl(const LLSliderCtrl::Params& p) slider_p.min_value.setIfNotProvided(p.min_value); slider_p.max_value.setIfNotProvided(p.max_value); slider_p.increment.setIfNotProvided(p.increment); - + slider_p.orientation.setIfNotProvided(p.orientation); + slider_p.commit_callback.function(&LLSliderCtrl::onSliderCommit); slider_p.control_name(p.control_name); slider_p.mouse_down_callback( p.mouse_down_callback ); @@ -260,7 +261,7 @@ void LLSliderCtrl::onEditorCommit( LLUICtrl* ctrl, const LLSD& userdata ) if( self->mSlider->getMinValue() <= val && val <= self->mSlider->getMaxValue() ) { self->setValue( val ); // set the value temporarily so that the callback can retrieve it. - if( self->mValidateSignal( self, val ) ) + if( !self->mValidateSignal || (*(self->mValidateSignal))( self, val ) ) { success = TRUE; } @@ -294,7 +295,7 @@ void LLSliderCtrl::onSliderCommit( LLUICtrl* ctrl, const LLSD& userdata ) F32 new_val = self->mSlider->getValueF32(); self->mValue = new_val; // set the value temporarily so that the callback can retrieve it. - if( self->mValidateSignal( self, new_val ) ) + if( !self->mValidateSignal || (*(self->mValidateSignal))( self, new_val ) ) { success = TRUE; } |
