Author: cwarrens
Date: 2009-11-27 04:18:37 -0800 (Fri, 27 Nov 2009)
New Revision: 6944
Log:
Changed the valuator previous_value_ member to be an instance variable in lieu 
of a class variable. This fixes a problem where using one scrollbar could lead 
to a second active scrollbar escaping its minimum/maximum bounds.

Modified:
   trunk/fltk/Valuator.h
   trunk/src/Valuator.cxx

Modified: trunk/fltk/Valuator.h
===================================================================
--- trunk/fltk/Valuator.h       2009-11-18 12:43:21 UTC (rev 6943)
+++ trunk/fltk/Valuator.h       2009-11-27 12:18:37 UTC (rev 6944)
@@ -78,7 +78,7 @@
 private:
 
   double value_;
-  static double previous_value_;
+  double previous_value_;
   double minimum_;
   double maximum_;
   double step_;

Modified: trunk/src/Valuator.cxx
===================================================================
--- trunk/src/Valuator.cxx      2009-11-18 12:43:21 UTC (rev 6943)
+++ trunk/src/Valuator.cxx      2009-11-27 12:18:37 UTC (rev 6944)
@@ -81,6 +81,7 @@
   minimum_ = 0;
   maximum_ = 1;
   linesize_ = 0;
+  previous_value_ = 0;
 }
 
 /*! \fn double Valuator::value() const
@@ -185,7 +186,6 @@
 /*! \fn double Valuator::previous_value() const
   Value saved when handle_push() was last called.
 */
-double Valuator::previous_value_;
 
 /*! \fn void Valuator::handle_push()
   Subclasses should call this when the user starts to change the value. 

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to