Draft: Fixed adding points in Wires

This commit is contained in:
Yorik van Havre
2018-08-29 21:49:56 -03:00
parent 3d70f9ed4f
commit 682650b0b2

View File

@@ -4087,6 +4087,10 @@ class Edit(Modifier):
# commented out the following line to disable updating
# the object during edit, otherwise it confuses the snapper
#self.update(self.trackers[self.editing].get())
if self.ui.addButton.isChecked():
self.obj.ViewObject.Selectable = True
else:
self.obj.ViewObject.Selectable = False
redraw3DView()
elif arg["Type"] == "SoMouseButtonEvent":
if (arg["State"] == "DOWN") and (arg["Button"] == "BUTTON1"):
@@ -4098,8 +4102,11 @@ class Edit(Modifier):
if info["Object"] == self.obj.Name:
if self.ui.addButton.isChecked():
if self.point:
self.pos = arg["Position"]
self.addPoint(self.point,info)
pt = self.point
if "x" in info:
# prefer "real" 3D location over working-plane-driven one if possible
pt = FreeCAD.Vector(info["x"],info["y"],info["z"])
self.addPoint(pt,info)
elif self.ui.delButton.isChecked():
if 'EditNode' in info["Component"]:
self.delPoint(int(info["Component"][8:]))