[Kst] branches/work/kst/portto4/kst/src/libkstapp

Mike Fenton mike at staikos.net
Thu Jun 18 19:13:22 CEST 2009


SVN commit 983639 by fenton:

Reduce significant digit count for log axis.


 M  +3 -3      plotaxis.cpp  


--- branches/work/kst/portto4/kst/src/libkstapp/plotaxis.cpp #983638:983639
@@ -658,7 +658,7 @@
     if (majorPoint == 0) majorPoint = -350;
     if (i >= min && i <= max) {
       *MajorTicks << majorPoint;
-      *Labels->insert(majorPoint, QString::number(majorPoint, 'g', FULL_PRECISION-2));
+      *Labels->insert(majorPoint, QString::number(majorPoint, 'g', 2));
     }
 
     if (tick == 1.0) {
@@ -670,7 +670,7 @@
         if (minorPoint >= powMin && minorPoint <= powMax) {
           *MinorTicks << minorPoint;
           if (minorLabels && first) {
-            *Labels->insert(minorPoint, QString::number(minorPoint, 'g', FULL_PRECISION-2));
+            *Labels->insert(minorPoint, QString::number(minorPoint, 'g', 2));
             first = false;
           }
         }
@@ -681,7 +681,7 @@
     qreal lastMinorTick = MinorTicks->last();
     if (MajorTicks->isEmpty() || MajorTicks->last() < lastMinorTick) {
       if (!Labels->contains(lastMinorTick)) {
-        *Labels->insert(lastMinorTick, QString::number(lastMinorTick, 'g', FULL_PRECISION-2));
+        *Labels->insert(lastMinorTick, QString::number(lastMinorTick, 'g', 2));
       }
     }
   }


More information about the Kst mailing list