summaryrefslogtreecommitdiffhomepage
path: root/spline-widget
diff options
context:
space:
mode:
Diffstat (limited to 'spline-widget')
-rw-r--r--spline-widget/spline-widget.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/spline-widget/spline-widget.cpp b/spline-widget/spline-widget.cpp
index 47ae6fdd..6c51c2a2 100644
--- a/spline-widget/spline-widget.cpp
+++ b/spline-widget/spline-widget.cpp
@@ -519,8 +519,8 @@ void spline_widget::update_range()
bool spline_widget::point_within_pixel(const QPointF& pt, const QPoint &pixel)
{
- QPointF tmp = pixel - point_to_pixel(pt);
- return sqrt(QPointF::dotProduct(tmp, tmp)) < point_size;
+ const QPointF tmp = pixel - point_to_pixel(pt);
+ return QPointF::dotProduct(tmp, tmp) < point_size * point_size;
}
void spline_widget::focusOutEvent(QFocusEvent* e)