# HG changeset patch # User Teemu Piippo # Date 1521886009 -7200 # Node ID 413d7be6f042795cedc4f7b0c61fd5fe417660a1 # Parent bdb4804bc09c1704aaa637093f9573bbe9d51e7a used squared() diff -r bdb4804bc09c -r 413d7be6f042 src/editmodes/abstractEditMode.cpp --- a/src/editmodes/abstractEditMode.cpp Sat Mar 24 12:06:22 2018 +0200 +++ b/src/editmodes/abstractEditMode.cpp Sat Mar 24 12:06:49 2018 +0200 @@ -112,7 +112,7 @@ if ((data.releasedButtons & Qt::MidButton) and (countof(m_drawedVerts) < 4) and (not data.mouseMoved)) { // Find the closest vertex to our cursor - double minimumDistance = 1024.0; + double minimumDistance = ::squared(32.0); const Vertex* closest = nullptr; Vertex cursorPosition = renderer()->currentCamera().convert2dTo3d(data.ev->pos()); QPoint cursorPosition2D = data.ev->pos();