summaryrefslogtreecommitdiff
path: root/common/project.cpp
diff options
context:
space:
mode:
authorleo2006-03-05 23:13:17 +0000
committerleo2006-03-05 23:13:17 +0000
commita393e0e4f9b7e492e78388565b7c39928564ca0b (patch)
treeb39953464a4afa0bf100d3fac7eab7460b3b13d3 /common/project.cpp
parent6597c77239e93b24055de080000f2c30bc104769 (diff)
Fixed a bug selecting the piece rotation circles.
git-svn-id: http://svn.leocad.org/trunk@514 c7d43263-9d01-0410-8a33-9dba5d9f93d6
Diffstat (limited to 'common/project.cpp')
-rw-r--r--common/project.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/common/project.cpp b/common/project.cpp
index fb6d044..303b863 100644
--- a/common/project.cpp
+++ b/common/project.cpp
@@ -9212,10 +9212,6 @@ void Project::MouseUpdateOverlays(int x, int y)
if (Dot3(ViewDir, Dist) > 0.0f)
continue;
- // Check if we're close enough to one of the axis.
- Dist.Normalize();
- Dist.Abs();
-
// Find the rotation from the focused piece if relative snap is enabled.
if ((m_nSnap & LC_DRAW_SNAP_GRID) == 0)
{
@@ -9233,6 +9229,9 @@ void Project::MouseUpdateOverlays(int x, int y)
}
}
+ // Check if we're close enough to one of the axis.
+ Dist.Normalize();
+
float dx = fabsf(Dist[0]);
float dy = fabsf(Dist[1]);
float dz = fabsf(Dist[2]);
@@ -9279,7 +9278,6 @@ void Project::MouseUpdateOverlays(int x, int y)
break;
}
- Dist.Normalize();
Dist *= r;
m_OverlayTrackStart = Center + Dist;