Draft: Make Std_TransformManip work for Draft_Point

This commit is contained in:
Roy-043
2022-10-17 19:48:05 +02:00
committed by GitHub
parent a873837e7c
commit 293614895b

View File

@@ -60,9 +60,15 @@ class Point(DraftObject):
import Part
shape = Part.Vertex(App.Vector(0, 0, 0))
obj.Shape = shape
obj.Placement.Base = App.Vector(obj.X.Value,
obj.Y.Value,
obj.Z.Value)
obj.Placement.Base = App.Vector(obj.X, obj.Y, obj.Z)
def onChanged(self, obj, prop):
if prop == "Placement" \
and obj.Placement.Base != App.Vector(obj.X, obj.Y, obj.Z):
base = obj.Placement.Base
obj.X = base.x
obj.Y = base.y
obj.Z = base.z
# Alias for compatibility with v0.18 and earlier