Bugfixes in Draft Snap
This commit is contained in:
parent
26602b2aa3
commit
1af6a3c2b1
|
@ -100,7 +100,7 @@ class _CommandWall:
|
|||
self.tracker = DraftTrackers.boxTracker()
|
||||
FreeCADGui.Snapper.getPoint(callback=self.getPoint)
|
||||
|
||||
def getPoint(self,point,obj):
|
||||
def getPoint(self,point=None,obj=None):
|
||||
"this function is called by the snapper when it has a 3D point"
|
||||
if obj:
|
||||
if Draft.getType(obj) == "Wall":
|
||||
|
|
|
@ -851,6 +851,9 @@ class DraftToolBar:
|
|||
numz=float(self.zValue.text())
|
||||
except ValueError:
|
||||
pass
|
||||
else:
|
||||
if self.pointcallback:
|
||||
self.pointcallback(FreeCAD.Vector(numx,numy,numz),(self.isRelative.isVisible() and self.isRelative.isChecked()))
|
||||
else:
|
||||
if self.isRelative.isVisible() and self.isRelative.isChecked():
|
||||
if self.sourceCmd.node:
|
||||
|
@ -867,9 +870,6 @@ class DraftToolBar:
|
|||
numx = v.x
|
||||
numy = v.y
|
||||
numz = v.z
|
||||
if self.pointcallback:
|
||||
self.pointcallback(FreeCAD.Vector(numx,numy,numz),self.isRelative.isChecked())
|
||||
else:
|
||||
self.sourceCmd.numericInput(numx,numy,numz)
|
||||
|
||||
def finish(self):
|
||||
|
|
|
@ -678,7 +678,8 @@ class Snapper:
|
|||
def getcoords(point,relative=False):
|
||||
self.pt = point
|
||||
if relative and last:
|
||||
self.pt = last.add(point)
|
||||
v = FreeCAD.DraftWorkingPlane.getGlobalCoords(point)
|
||||
self.pt = last.add(v)
|
||||
accept()
|
||||
|
||||
def click(event_cb):
|
||||
|
|
Loading…
Reference in New Issue
Block a user