From 50fb2c0647c6bb9b215236a56c75131673ef4172 Mon Sep 17 00:00:00 2001 From: Eduardo Davila Date: Wed, 24 Oct 2012 15:04:30 +0000 Subject: [PATCH] Bug #1716 bbtkwx:slider not update reactiviteOn state --- packages/wx/src/bbwxSlider.cxx | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/packages/wx/src/bbwxSlider.cxx b/packages/wx/src/bbwxSlider.cxx index 0b4e7b3..43f6516 100644 --- a/packages/wx/src/bbwxSlider.cxx +++ b/packages/wx/src/bbwxSlider.cxx @@ -2,8 +2,8 @@ Program: bbtk Module: $RCSfile: bbwxSlider.cxx,v $ Language: C++ - Date: $Date: 2009/10/05 22:44:52 $ - Version: $Revision: 1.25 $ + Date: $Date: 2012/10/24 15:04:30 $ + Version: $Revision: 1.26 $ =========================================================================*/ /* --------------------------------------------------------------------- @@ -81,7 +81,10 @@ namespace bbwx void SetRange(int min, int max); // Update the texts which display the min/max/current values of the slider void RefreshLabels(); - + + void SetReactiveOnTrack(bool ok); + + private: Slider* mBox; wxSlider *mwxSlider; @@ -291,7 +294,8 @@ namespace bbwx } //------------------------------------------------------------------------- - + + //------------------------------------------------------------------------- SliderWidget::~SliderWidget() { @@ -384,6 +388,14 @@ namespace bbwx mwxSlider->SetRange(min,max); RefreshLabels(); } + + + //------------------------------------------------------------------------- + void SliderWidget::SetReactiveOnTrack(bool ok) + { + reactiveOnTrack = ok; + } + //------------------------------------------------------------------------- @@ -432,9 +444,11 @@ namespace bbwx // desperate try // JPR if ( bbGetInputMin() != ((SliderWidget*)bbGetOutputWidget())->GetMin() || bbGetInputMax() != ((SliderWidget*)bbGetOutputWidget())->GetMax() ) { - ((SliderWidget*)bbGetOutputWidget())->SetRange(bbGetInputMin(),bbGetInputMax()) ; + ((SliderWidget*)bbGetOutputWidget())->SetRange(bbGetInputMin(),bbGetInputMax()) ; } - + + ((SliderWidget*)bbGetOutputWidget())->SetReactiveOnTrack( bbGetInputReactiveOnTrack() ) ; + bbSetOutputOut( bbGetInputIn() ); if (bbGetOutputWidget()!=0) { @@ -442,6 +456,7 @@ namespace bbwx } } +//-------------------------------------------------------------------------- void Slider::CreateWidget(wxWindow* parent) { -- 2.47.1