[Kst] kdeextragear-2/kst

George Staikos staikos at kde.org
Thu Jun 10 20:31:42 CEST 2004


CVS commit by staikos: 

make zooming behave as it did before


  M +0 -1      devel-docs/newviewtodo.txt   1.24
  M +9 -3      kst/kst2dplot.cpp   1.78


--- kdeextragear-2/kst/devel-docs/newviewtodo.txt  #1.23:1.24
@@ -50,5 +50,4 @@
 - X axis alignment                              (George)
 - Tie boxes should indicate current plot focus  (George)
-- Make zoom boxes behave as they did before     (George & Barth)
 - Frame # in status bar                         (George)
 

--- kdeextragear-2/kst/kst/kst2dplot.cpp  #1.77:1.78
@@ -1972,4 +1972,5 @@ void Kst2DPlot::mouseMoveEvent(QWidget *
   QRect pr = GetPlotRegion();
   if (e->state() & Qt::LeftButton && _mouse.zooming()) {
+/*
     if (e->state() & Qt::ShiftButton) {
       newType = Y_ZOOMBOX;
@@ -1980,4 +1981,5 @@ void Kst2DPlot::mouseMoveEvent(QWidget *
       assert(newType != INACTIVE && newType != LABEL_TOOL);
     }
+*/
   } else if (KstApp::inst()->dataMode() && pr.contains(e->pos())) {
     double near_x, near_y;
@@ -2448,5 +2450,5 @@ void Kst2DPlot::setCursorForMode(QWidget
 
 void Kst2DPlot::keyReleaseEvent(QWidget *view, QKeyEvent *e) {
-  if (_mouse.mode == LABEL_TOOL) {
+  if (_mouse.mode != INACTIVE) {
     e->ignore();
     return;
@@ -2454,8 +2456,9 @@ void Kst2DPlot::keyReleaseEvent(QWidget 
 
   ButtonState s = e->stateAfter();
-  KstMouseModeType newType;
+  KstMouseModeType newType = globalZoomType();
   QPoint c = view->mapFromGlobal(QCursor::pos());
   QRect pr = GetPlotRegion();
   int x = _mouse.pressLocation.x(), y = _mouse.pressLocation.y();
+/*
   if (s & Qt::ShiftButton) {
     newType = Y_ZOOMBOX;
@@ -2466,4 +2469,5 @@ void Kst2DPlot::keyReleaseEvent(QWidget 
     assert(newType != INACTIVE && newType != LABEL_TOOL);
   }
+*/
 
   if (newType == Y_ZOOMBOX) {
@@ -2942,5 +2946,6 @@ void Kst2DPlot::keyPressEvent(QWidget *v
 
   if (_mouse.zooming()) {
-    KstMouseModeType newType;
+    KstMouseModeType newType = _mouse.mode;
+/*
     if (s & Qt::ShiftButton) {
       newType = Y_ZOOMBOX;
@@ -2951,4 +2956,5 @@ void Kst2DPlot::keyPressEvent(QWidget *v
       assert(newType != INACTIVE && newType != LABEL_TOOL);
     }
+*/
 
     if (e->key() == Qt::Key_Escape) {





More information about the Kst mailing list