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

Barth Netterfield netterfield at astro.utoronto.ca
Fri Dec 9 14:50:33 UTC 2011


SVN commit 1267877 by netterfield:

BUG:
Markers didn't work in log mode.  Now they do.



 M  +4 -3      plotitem.cpp  


--- branches/work/kst/portto4/kst/src/libkstapp/plotitem.cpp #1267876:1267877
@@ -1066,7 +1066,8 @@
   }
   _xPlotMarkerLines.clear();
   foreach (double x, _xAxis->axisPlotMarkers().markers()) {
-    if (x > _xMin && x < _xMax) {
+    double xx = _xAxis->axisLog() ? logXLo(x) : x;
+    if (xx > _xMin && xx < _xMax) {
       QPointF p1 = QPointF(mapXToPlot(x), rect.bottom());
       QPointF p2 = p1 - QPointF(0, rect.height());
       _xPlotMarkerLines << QLineF(p1, p2);
@@ -1180,7 +1181,8 @@
   }
   _yPlotMarkerLines.clear();
   foreach (double y, _yAxis->axisPlotMarkers().markers()) {
-    if (y > _yMin && y < _yMax) {
+    double yy = _yAxis->axisLog() ? logYLo(y) : y;
+    if (yy > _yMin && yy < _yMax) {
       QPointF p1 = QPointF(rect.left(), mapYToPlot(y));
       QPointF p2 = p1 + QPointF(rect.width(), 0);
       _yPlotMarkerLines << QLineF(p1, p2);
@@ -1510,7 +1512,6 @@
     painter->drawLines(_yPlotMarkerLines);
     painter->restore();
   }
-
 }
 
 


More information about the Kst mailing list