From 51c93f8c6c7c9d84634c0e840281373bbe25a89c Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 26 Dec 2013 01:36:41 +0100 Subject: qfc: reenable mouse tracking all the time --- qfunctionconfigurator/qfunctionconfigurator.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'qfunctionconfigurator') 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 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); -- cgit v1.2.3