[Kst] extragear/graphics/kst/kst

Rick Chern rchern at interchange.ubc.ca
Wed Jun 22 02:53:49 CEST 2005


SVN commit 427830 by rchern:

Fix local y zoom maximum when y range is very small

 M  +6 -5      kst2dplot.cpp  


--- trunk/extragear/graphics/kst/kst/kst2dplot.cpp #427829:427830
@@ -800,13 +800,13 @@
 
 bool Kst2DPlot::setYScale(double ymin_in, double ymax_in) {
   bool rc = false;
-
+  
   if (checkRange(ymin_in, ymax_in)) {
     YMax = ymax_in;
     YMin = ymin_in;
     rc = true;
   }
-
+  
   return rc;
 }
 
@@ -1261,7 +1261,7 @@
         YMin -= 0.1;
         YMax  = YMin + 0.2;
       }
-
+      
       // now do the same thing for images
       if (!_images.isEmpty() && Curves.isEmpty()) {
         _images[0]->matrixDimensions(imgX, imgY, imgWidth, imgHeight);
@@ -1379,6 +1379,7 @@
       break;
 
     case FIXED:  // don't change the range
+      
       if (YMin > YMax) {  // has to be legal, even for fixed scale...
         double tmp = YMax;
         YMax = YMin;
@@ -5137,9 +5138,9 @@
     newYMin = pow(10.0, -350.0);
   }
   
+  YMin = newYMin;
+  YMax = newYMax;
   setYScaleMode(FIXED);
-  
-  setYScale(newYMin, newYMax);
 }
 
 void Kst2DPlot::moveSelfToCenter(double center) {


More information about the Kst mailing list