do not create a horizontal/vertical constraint when snapping lines

This commit is contained in:
Josh Holtrop 2011-07-28 18:10:38 -04:00
parent f6b2b30910
commit 84f1e6585b

View File

@ -396,6 +396,8 @@ class SketchWidget:
self.drawingConstraints['c2'] = c
pt = self.hover_snap_ptref.getPt()
self.drawingShape.setPt(1, pt)
# don't do a horizontal/vertical when snapping
self.drawingConstraints['hv'] = None
self.merge_in_drawing_shape()
start = prev_line.getPt(1)
start_pt_ref = PointRef(prev_line, 1)
@ -479,6 +481,7 @@ class SketchWidget:
def merge_in_drawing_shape(self):
self.sketch.shapes.append(self.drawingShape)
for c in self.drawingConstraints:
if self.drawingConstraints[c] is not None:
self.sketch.constraints.append(self.drawingConstraints[c])
self.drawingShape = None
self.drawingConstraints = {}