summaryrefslogtreecommitdiffhomepage
path: root/qfunctionconfigurator
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-12-26 01:36:41 +0100
committerStanislaw Halik <sthalik@misaki.pl>2013-12-26 01:36:41 +0100
commit51c93f8c6c7c9d84634c0e840281373bbe25a89c (patch)
tree09bbcf2ede3aff193abbcd65b8a86ceb9a492369 /qfunctionconfigurator
parente3d7246f63b30931d3b1d41a4b036bd0c661d06d (diff)
qfc: reenable mouse tracking all the time
Diffstat (limited to 'qfunctionconfigurator')
-rw-r--r--qfunctionconfigurator/qfunctionconfigurator.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/qfunctionconfigurator/qfunctionconfigurator.cpp b/qfunctionconfigurator/qfunctionconfigurator.cpp
index a80e3b6b..4ad0a9a4 100644
--- a/qfunctionconfigurator/qfunctionconfigurator.cpp
+++ b/qfunctionconfigurator/qfunctionconfigurator.cpp
@@ -52,6 +52,8 @@ QFunctionConfigurator::QFunctionConfigurator(QWidget *parent)
_draw_background = true;
_draw_function = true;
+ setMouseTracking(true);
+
// qDebug() << "QFunctionConfigurator::QFunctionConfigurator object created.";
}
@@ -357,7 +359,6 @@ void QFunctionConfigurator::mousePressEvent(QMouseEvent *e)
bTouchingPoint = true;
movingPoint = i;
timer.restart();
- setMouseTracking(true);
break;
}
}
@@ -398,7 +399,6 @@ void QFunctionConfigurator::mousePressEvent(QMouseEvent *e)
emit CurveChanged( true );
}
movingPoint = -1;
- setMouseTracking(false);
}
}
_draw_function = _draw_background = true;
@@ -461,7 +461,6 @@ void QFunctionConfigurator::mouseReleaseEvent(QMouseEvent *e)
QList<QPointF> points = _config->getPoints();
if (e->button() == Qt::LeftButton) {
- setMouseTracking(false);
timer.invalidate();
//qDebug()<<"releasing";
if (movingPoint >= 0 && movingPoint < points.size()) {
@@ -489,7 +488,7 @@ bool QFunctionConfigurator::markContains(const QPointF &pos, const QPointF &coor
{
QRectF rect(pos.x() - pointSize,
pos.y() - pointSize,
- pointSize*3, pointSize*3);
+ pointSize*M_PI, pointSize*M_PI);
QPainterPath path;
path.addEllipse(rect);
return path.contains(coord);