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

Mike Fenton mike at staikos.net
Tue Feb 19 20:03:30 CET 2008


SVN commit 777106 by fenton:

Fix crash when no ticks are allowed.


 M  +2 -2      plotitem.cpp  


--- branches/work/kst/portto4/kst/src/libkstapp/plotitem.cpp #777105:777106
@@ -1865,9 +1865,9 @@
       }
     }
   }
-  if (minorLabels) {
+  if (minorLabels && !MinorTicks->isEmpty()) {
     qreal lastMinorTick = MinorTicks->last();
-    if (MajorTicks->last() < lastMinorTick) {
+    if (MajorTicks->isEmpty() || MajorTicks->last() < lastMinorTick) {
       if (!Labels->contains(lastMinorTick)) {
         qreal adjustedMinorPoint = lastMinorTick;
         if (_xAxisReversed && xAxis) {


More information about the Kst mailing list