From 0595320e3e0f52752c51a8e1064b042807469b52 Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 9 Nov 2005 20:17:44 +0000 Subject: Increase the mouse range when rotating views. git-svn-id: http://svn.leocad.org/trunk@440 c7d43263-9d01-0410-8a33-9dba5d9f93d6 --- common/project.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'common') diff --git a/common/project.cpp b/common/project.cpp index 0a2418c..9f60bb8 100644 --- a/common/project.cpp +++ b/common/project.cpp @@ -9160,12 +9160,14 @@ void Project::MouseUpdateOverlays(int x, int y) float d = sqrtf((float)((cx - x) * (cx - x) + (cy - y) * (cy - y))); float r = min(vw, vh) * 0.35f; - if ((d < r + 4.0f) && (d > r - 4.0f)) + const float SquareSize = max(8.0f, (vw+vh)/200); + + if ((d < r + SquareSize) && (d > r - SquareSize)) { - if ((cx - x < 4) && (cx - x > -4)) + if ((cx - x < SquareSize) && (cx - x > -SquareSize)) m_OverlayMode = LC_OVERLAY_Y; - if ((cy - y < 4) && (cy - y > -4)) + if ((cy - y < SquareSize) && (cy - y > -SquareSize)) m_OverlayMode = LC_OVERLAY_X; } else -- cgit v1.2.3