[Kst] kdeextragear-2/kst/kst

Andrew Walker arwalker at sumusltd.com
Tue Jul 13 00:55:44 CEST 2004


CVS commit by arwalker: 

Make datamode work for plots that are not situtated at the top left of a window.


  M +4 -4      kst2dplot.cpp   1.143


--- kdeextragear-2/kst/kst/kst2dplot.cpp  #1.142:1.143
@@ -855,5 +855,6 @@ void Kst2DPlot::setBorders(double& xleft
 
 void Kst2DPlot::drawDotAt(QPainter& p, double x, double y) {
-  int X1, Y1;
+  int X1;
+  int Y1;
 
   if (_xLog) {
@@ -864,7 +865,6 @@ void Kst2DPlot::drawDotAt(QPainter& p, d
   }
 
-  X1 = (int)(_m_X * x + _b_X);
-  Y1 = (int)(_m_Y * y + _b_Y);
-
+  X1  = (int)(_m_X * x + _b_X) + position().x();
+  Y1  = (int)(_m_Y * y + _b_Y) + position().y();
   if (PlotRegion.contains(X1, Y1)) {
     p.setPen(QPen(QColor(255,0,0), 2));





More information about the Kst mailing list