]> Creatis software - bbtk.git/blobdiff - packages/wx/src/bbwxSlider.cxx
Fix min max troubles
[bbtk.git] / packages / wx / src / bbwxSlider.cxx
index 7022095c01e2c408af665f21f22e4b0cd15117f6..1a5bd25cc019625dba7643f86ccaa455c5c0aee1 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbwxSlider.cxx,v $
   Language:  C++
-  Date:      $Date: 2009/04/16 14:17:50 $
-  Version:   $Revision: 1.22 $
+  Date:      $Date: 2009/04/16 16:08:23 $
+  Version:   $Revision: 1.23 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -76,6 +76,8 @@ namespace bbwx
     // Accessors
     void SetValue(int v) { mwxSlider->SetValue(v); }
     int  GetValue() { return mwxSlider->GetValue(); }
+    int GetMin() {return min;}
+    int GetMax() {return max;}    
     void SetRange(int min, int max);
     // Update the texts which display the min/max/current values of the slider
     void RefreshLabels();
@@ -416,7 +418,13 @@ namespace bbwx
     bbtkDebugMessage("process",3,
                     "Slider "<<bbGetName()<<" input="
                     <<bbGetInputIn()<<std::endl);
-   
+
+// desperate try // JPR
+      if ( bbGetInputMin() != ((SliderWidget*)bbGetOutputWidget())->GetMin() ||  bbGetInputMax() != ((SliderWidget*)bbGetOutputWidget())->GetMax() )       
+      {    
+       ((SliderWidget*)bbGetOutputWidget())->SetRange(bbGetInputMin(),bbGetInputMax()) ;
+      }
+      
     bbSetOutputOut( bbGetInputIn() );
     if (bbGetOutputWidget()!=0)
       {