Bug 135475 - plot guideline is drawn over zoom box
Summary: plot guideline is drawn over zoom box
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: plotting (show other bugs)
Version: 1.x
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-11 23:22 UTC by George Staikos
Modified: 2010-08-14 14:41 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description George Staikos 2006-10-11 23:22:20 UTC
in XY mode, hold CTRL and draw a zoom box.  The box is drawn but the guideline 
is also drawn.  This looks unclean.  The guideline should not be drawn.
Comment 1 Andrew Walker 2006-10-20 20:09:41 UTC
SVN commit 597554 by arwalker:

BUG:135475 No longer draw the guideline at the same time as the zoom box.

 M  +19 -6     kst2dplot.cpp  


--- trunk/extragear/graphics/kst/src/libkstapp/kst2dplot.cpp #597553:597554
@@ -2399,14 +2399,18 @@
         }
       }
     }
-
+    
     KstMouseModeType gzType = globalZoomType();
     if (view && GetPlotRegion().contains(_mouse.tracker)) {
       if (gzType == X_ZOOMBOX || gzType == Y_ZOOMBOX) {
-        updateXYGuideline(view, QPoint(-1, -1), view->mapFromGlobal(QCursor::pos()), GetPlotRegion(), gzType);
+        updateXYGuideline(view, QPoint(-1, -1), view->mapFromGlobal(QCursor::pos()), GetPlotRegion(), _mouse.mode);
       } else if (gzType == XY_ZOOMBOX) {
-        updateXYGuideline(view, QPoint(-1, -1), view->mapFromGlobal(QCursor::pos()), GetPlotRegion(), gzType);
+        updateXYGuideline(view, QPoint(-1, -1), view->mapFromGlobal(QCursor::pos()), GetPlotRegion(), _mouse.mode);
+      } else {
+        _mouse.lastGuideline = QPoint(-1, -1);        
       }
+    } else {
+      _mouse.lastGuideline = QPoint(-1, -1);        
     }
   }
 }
@@ -4062,9 +4066,17 @@
   } else if (gzType == XY_ZOOMBOX) {
     ButtonState s = e->stateAfter();
     if (s & Qt::ShiftButton) {
-      updateXYGuideline(view, _mouse.lastGuideline, _mouse.tracker, pr, Y_ZOOMBOX);
+      if (e->state() & Qt::LeftButton && _mouse.zooming()) {
+        updateXYGuideline(view, _mouse.lastGuideline, QPoint(-1, -1), pr, Y_ZOOMBOX);
+      } else {
+        updateXYGuideline(view, _mouse.lastGuideline, _mouse.tracker, pr, Y_ZOOMBOX);
+      }
     } else if (s & Qt::ControlButton) {
-      updateXYGuideline(view, _mouse.lastGuideline, _mouse.tracker, pr, X_ZOOMBOX);
+      if (e->state() & Qt::LeftButton && _mouse.zooming()) {
+        updateXYGuideline(view, _mouse.lastGuideline, QPoint(-1, -1), pr, X_ZOOMBOX);
+      } else {
+        updateXYGuideline(view, _mouse.lastGuideline, _mouse.tracker, pr, X_ZOOMBOX);
+      }
     } else {
       updateXYGuideline(view, _mouse.lastGuideline, QPoint(-1, -1), pr, gzType);
     }
@@ -4346,8 +4358,9 @@
       }
     }
   }
-
+ 
   _mouse.mode = INACTIVE;
+  setCursorForMode(view, _mouse.mode, e->pos());
 
   if (doUpdate) {
     kstdDebug() << "mouse release: do update" << endl;
Comment 2 Peter Kümmel 2010-08-14 14:41:01 UTC
Change version to 1.x