Summary: | zoom guidlines remain as phantoms when switching mouse modes with F-keys. | ||
---|---|---|---|
Product: | [Applications] kst | Reporter: | Matthew Truch <matt> |
Component: | general | Assignee: | kst |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 1.x | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | Proposed patch |
Description
Matthew Truch
2006-06-16 20:12:54 UTC
A similar problem (but probably more eveident) also exists. STEPS TO REPRODUCE: Start Kst Create a plot Switch to x mouse zoom mode Bring up any dialog from within Kst Click on the titlebar of the dialog and drag it over the plot area RESULTS: A trail of the guideline follows the mouse Known issue and mentioned in the feature request for this feature. It will be fixed once kst2dplot is fixed. Created attachment 16647 [details]
Proposed patch
Fixes both the problems described.
The patch looks fine. Please don't split the updateXYGuideline line though. It makes grep harder to work with. I'm not sure this is all the cases of this problem. I had identified several when I last worked on it. SVN commit 552204 by arwalker: BUG:129270 Ensure no phantom guidelines are created when switching modes. M +4 -2 kst2dplot.cpp M +1 -1 ksttoplevelview.cpp --- trunk/extragear/graphics/kst/src/libkstapp/kst2dplot.cpp #552203:552204 @@ -2383,8 +2383,10 @@ KstMouseModeType gzType = globalZoomType(); if (view && (gzType == X_ZOOMBOX || gzType == Y_ZOOMBOX)) { - updateXYGuideline(view, QPoint(-1, -1), view->mapFromGlobal(QCursor::pos()), GetPlotRegion(), gzType); - _mouse.lastGuideline = view->mapFromGlobal(QCursor::pos()); + if (GetPlotRegion().contains(_mouse.tracker)) { + updateXYGuideline(view, QPoint(-1, -1), view->mapFromGlobal(QCursor::pos()), GetPlotRegion(), gzType); + _mouse.lastGuideline = view->mapFromGlobal(QCursor::pos()); + } } } } --- trunk/extragear/graphics/kst/src/libkstapp/ksttoplevelview.cpp #552203:552204 @@ -240,10 +240,10 @@ if (_mode == LayoutMode && v != LayoutMode) { recursively<bool>(&KstViewObject::setSelected, false); clearFocus(); - paint(KstPainter::P_PAINT); } else if (_mode == DisplayMode && v != DisplayMode) { recursively<bool>(&KstViewObject::setMaximized, false); } + paint(KstPainter::P_PAINT); _mode = v; |