0001082: Adding points in Draft Edit

This commit is contained in:
Yorik van Havre 2013-04-07 17:39:00 -03:00
parent a7e3f0539d
commit 5c65086735

View File

@ -2984,8 +2984,8 @@ class Edit(Modifier):
elif arg["Key"] == "c": elif arg["Key"] == "c":
self.finish(closed=True) self.finish(closed=True)
elif arg["Type"] == "SoLocation2Event": #mouse movement detection elif arg["Type"] == "SoLocation2Event": #mouse movement detection
if self.editing != None:
self.point,ctrlPoint,info = getPoint(self,arg) self.point,ctrlPoint,info = getPoint(self,arg)
if self.editing != None:
self.trackers[self.editing].set(self.point) self.trackers[self.editing].set(self.point)
self.update(self.trackers[self.editing].get()) self.update(self.trackers[self.editing].get())
elif arg["Type"] == "SoMouseButtonEvent": elif arg["Type"] == "SoMouseButtonEvent":
@ -3000,6 +3000,7 @@ class Edit(Modifier):
self.pos = arg["Position"] self.pos = arg["Position"]
self.addPoint(self.point) self.addPoint(self.point)
elif self.ui.delButton.isChecked(): elif self.ui.delButton.isChecked():
if sel.SubElementNames:
if 'EditNode' in sel.SubElementNames[0]: if 'EditNode' in sel.SubElementNames[0]:
self.delPoint(int(sel.SubElementNames[0][8:])) self.delPoint(int(sel.SubElementNames[0][8:]))
elif 'EditNode' in sel.SubElementNames[0]: elif 'EditNode' in sel.SubElementNames[0]: