summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-04-13 09:19:14 +0200
committerStanislaw Halik <sthalik@misaki.pl>2013-04-13 09:19:14 +0200
commit0badf0c6095c4b6bac87ebaab2b54d5e19edbd4b (patch)
treeafff2db7ca4cc913907dafc42c9e345aac6690eb
parent79b0e5f816b8c324984b8780c51dd8c25c698918 (diff)
Restore lost functionality; also, don't redraw all the time needlessly
-rw-r--r--qfunctionconfigurator/qfunctionconfigurator.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/qfunctionconfigurator/qfunctionconfigurator.cpp b/qfunctionconfigurator/qfunctionconfigurator.cpp
index 15488909..e3eb962b 100644
--- a/qfunctionconfigurator/qfunctionconfigurator.cpp
+++ b/qfunctionconfigurator/qfunctionconfigurator.cpp
@@ -330,7 +330,6 @@ int i;
// Draw the Points, that make up the Curve
//
if (_config) {
-
//
// When moving, also draw a sketched version of the Function.
//
@@ -384,7 +383,7 @@ int i;
drawLine(&p, QPoint(lastPoint.x(), range.top()), QPoint(lastPoint.x(), range.bottom()), pen);
drawLine(&p, QPoint(range.left(), lastPoint.y()), QPoint(range.right(), lastPoint.y()), pen);
- QTimer::singleShot(50, this, SLOT(update()));
+ //QTimer::singleShot(50, this, SLOT(update()));
}
//
@@ -489,13 +488,14 @@ void QFunctionConfigurator::mousePressEvent(QMouseEvent *e)
void QFunctionConfigurator::mouseMoveEvent(QMouseEvent *e)
{
- if (movingPoint >= 0) {
+ if (movingPoint >= 0 && movingPoint < _points.size()) {
setCursor(Qt::ClosedHandCursor);
//
// Change the currently moving Point.
//
+ _points[movingPoint] = normalizePoint(e->pos());
update();
}
else {