[Kst] kdeextragear-2/kst/kst

Andrew Walker arwalker at sumusltd.com
Wed Aug 11 22:55:54 CEST 2004


CVS commit by arwalker: 

Fix for 84840.


  M +31 -34    kst2dplot.cpp   1.220


--- kdeextragear-2/kst/kst/kst2dplot.cpp  #1.219:1.220
@@ -3563,28 +3563,24 @@ void Kst2DPlot::setDirty() {
 void Kst2DPlot::wheelEvent(QWidget *view, QWheelEvent *e) {
   KstViewWidget *vw = dynamic_cast<KstViewWidget*>(view);
-  if (!vw || !GetPlotRegion().contains(e->pos())) {
-    return;
-  }
-
+  if (vw && GetPlotRegion().contains(e->pos())) {
   bool forward = e->delta() >= 0;
   int absDelta = forward ? e->delta() : -e->delta();
   bool alt = e->state() & Qt::AltButton;
   if (e->state() & Qt::ControlButton) {
-    // Advance?  Something else?
-  } else if (e->state() & Qt::ShiftButton) {
     for (int i = 0; i < absDelta/WHEEL_DELTA; ++i) {
       if (forward) {
-        if (alt) {
-          yZoomIn(vw);
-        } else {
           xZoomIn(vw);
-        }
-      } else {
-        if (alt) {
-          yZoomOut(vw);
         } else {
           xZoomOut(vw);
         }
       }
+      vw->paint();
+    } else if (e->state() & Qt::ShiftButton) {
+      for (int i = 0; i < absDelta/WHEEL_DELTA; ++i) {
+        if (forward) {
+          yZoomIn(vw);
+        } else {
+          yZoomOut(vw);
+        }
     }
     vw->paint();
@@ -3609,4 +3605,5 @@ void Kst2DPlot::wheelEvent(QWidget *view
 
   e->accept();
+  }
 }
 





More information about the Kst mailing list