[Kst] kdeextragear-2/kst/kst
George Staikos
staikos at kde.org
Fri May 28 10:21:44 CEST 2004
CVS commit by staikos:
eliminate unnecessary repaint and enable zoom-previous
M +18 -1 kst2dplot.cpp 1.37
--- kdeextragear-2/kst/kst/kst2dplot.cpp #1.36:1.37
@@ -2045,4 +2045,5 @@ void Kst2DPlot::mouseReleaseEvent(QWidge
QRect plotregion;
unsigned int count;
+ bool doUpdate = false;
static_cast<KstViewWidget*>(view)->viewObject()->releaseMouse(this);
@@ -2073,4 +2074,5 @@ void Kst2DPlot::mouseReleaseEvent(QWidge
setLScale(new_xmin, new_ymin, new_xmax, new_ymax);
pushScale();
+ doUpdate = true;
// FIXME: handle tied mode
}
@@ -2088,4 +2090,5 @@ void Kst2DPlot::mouseReleaseEvent(QWidge
setLYScale(new_ymin, new_ymax);
pushScale();
+ doUpdate = true;
// FIXME: handle tied mode
}
@@ -2103,4 +2106,5 @@ void Kst2DPlot::mouseReleaseEvent(QWidge
setLXScale(new_xmin, new_xmax);
pushScale();
+ doUpdate = true;
// FIXME: handle tied mode
}
@@ -2119,5 +2123,7 @@ void Kst2DPlot::mouseReleaseEvent(QWidge
_mouse.mode = INACTIVE;
//needrecreate = true;
+ if (doUpdate) {
static_cast<KstViewWidget*>(view)->paint();
+ }
// Why?
@@ -2210,4 +2216,12 @@ void Kst2DPlot::setCursorForMode(QWidget
void Kst2DPlot::keyReleaseEvent(QWidget *view, QKeyEvent *e) {
+ if (e->key() == Key_R) {
+ if (popScale()) {
+ static_cast<KstViewWidget*>(view)->paint();
+ }
+ e->accept();
+ return;
+ }
+
if (_mouse.zooming() || _mouse.mode == INACTIVE) {
if (_mouse.mode != INACTIVE) {
@@ -2229,4 +2243,5 @@ void Kst2DPlot::keyReleaseEvent(QWidget
}
setCursorForMode(view);
+ e->accept();
} else {
e->ignore();
@@ -2286,6 +2301,8 @@ void Kst2DPlot::keyPressEvent(QWidget *v
} else {
e->ignore();
+ return;
}
}
+ e->accept();
}
More information about the Kst
mailing list