connect to snap points when creating a circle

This commit is contained in:
Josh Holtrop 2011-08-04 14:39:15 -04:00
parent f489d11a57
commit e3c9d19e9a

View File

@ -455,7 +455,13 @@ class SketchWidget:
def do_circle_left_click(self, x, y):
pt = self.screenPtToPt((x, self.size[1] - y))
if self.drawingShape is None:
hsp = self.hover_snap_ptref
if hsp is not None:
pt = hsp.getPt()
self.drawingShape = Circle(pt[0], pt[1], 0)
if hsp is not None:
c = Connect(hsp.shape, hsp.ptNum, self.drawingShape, 0)
self.drawingConstraints['c'] = c
else:
self.add_snap_ptrefs_from_shape(self.drawingShape)
self.merge_in_drawing_shape()