[Kst] kdeextragear-2/kst/kst

Barth Netterfield netterfield at astro.utoronto.ca
Sat Dec 11 04:49:30 CET 2004


CVS commit by netterfield: 

1) Fix a bug in clipping: GetPlotRegion returns the plot region relative
to the widget, for mouse position use... use Lx, Hx, instead, so that
curves in all windows get plotted, not just in the first window.

2) get rid of "emit modified" from from key press and mouse release events:
If the user loaded from the command line, zoomed around, then exited, there
is no need to prompt for saving....


  M +4 -3      kst2dplot.cpp   1.313


--- kdeextragear-2/kst/kst/kst2dplot.cpp  #1.312:1.313
@@ -3502,5 +3502,5 @@ void Kst2DPlot::mouseReleaseEvent(QWidge
     setDirty();
     static_cast<KstViewWidget*>(view)->paint();
-    emit modified();
+    //emit modified();
   }
 }
@@ -4353,5 +4353,5 @@ void Kst2DPlot::keyPressEvent(QWidget *v
     view->paint();
     e->accept();
-    emit modified();
+    //emit modified();
     return;
   }
@@ -5078,5 +5078,6 @@ void Kst2DPlot::plotCurves(QPainter& p,
   clipRegion = p.clipRegion();
   clipping = p.hasClipping();
-  p.setClipRegion(QRegion(GetPlotRegion(), QRegion::Rectangle));
+  p.setClipRegion(QRegion(int(Lx), int(Ly), int(Hx-Lx), int(Hy-Ly), 
+                          QRegion::Rectangle));
 
   for (int i_curve = 0; i_curve < (int)Curves.count(); i_curve++) {





More information about the Kst mailing list