Skip to content

Commit

Permalink
Draft: small fix in dimensions
Browse files Browse the repository at this point in the history
  • Loading branch information
yorikvanhavre committed Apr 15, 2014
1 parent 87bed7d commit c1978ec
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/Mod/Draft/Draft.py
Expand Up @@ -3137,13 +3137,19 @@ def updateData(self, obj, prop):
self.coord2.point.setValue((self.p3.x,self.p3.y,self.p3.z))

# calculate the text position and orientation
if DraftVecUtils.isNull(obj.Normal):
if not proj:
norm = Vector(0,0,1)
else:
norm = (self.p3.sub(self.p2).cross(proj)).negative()
if hasattr(obj,"Normal"):
if DraftVecUtils.isNull(obj.Normal):
if proj:
norm = (self.p3.sub(self.p2).cross(proj)).negative()
else:
norm = Vector(0,0,1)
else:
norm = obj.Normal
else:
norm = obj.Normal
if proj:
norm = (self.p3.sub(self.p2).cross(proj)).negative()
else:
norm = Vector(0,0,1)
if not DraftVecUtils.isNull(norm):
norm.normalize()
u = self.p3.sub(self.p2)
Expand Down

0 comments on commit c1978ec

Please sign in to comment.