From e367e2efc23321d94ec4a4ae0264f885b4f0333b Mon Sep 17 00:00:00 2001 From: angela Date: Mon, 23 Nov 2009 13:52:40 +0800 Subject: EXT-2159 Create Vertical Slider to use for zoom in / out controls in view --- indra/llui/llsliderctrl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/llui/llsliderctrl.cpp') diff --git a/indra/llui/llsliderctrl.cpp b/indra/llui/llsliderctrl.cpp index ed22c0a47f..ac35bc7992 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 ); -- cgit v1.2.3 From 7fd1488c6218ddbd82de0eea86297e65f2561bc7 Mon Sep 17 00:00:00 2001 From: richard Date: Mon, 23 Nov 2009 11:42:32 -0800 Subject: convert signals to allocate on demand in order to speed up widget construction reviewed by James --- indra/llui/llsliderctrl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/llui/llsliderctrl.cpp') diff --git a/indra/llui/llsliderctrl.cpp b/indra/llui/llsliderctrl.cpp index ed22c0a47f..a4f89ae1d3 100644 --- a/indra/llui/llsliderctrl.cpp +++ b/indra/llui/llsliderctrl.cpp @@ -260,7 +260,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 +294,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; } -- cgit v1.2.3