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.
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;
Change version to 1.x