From fc5077f413ad05c03cc7010badfab8352dd3012c Mon Sep 17 00:00:00 2001 From: Markus Lampert Date: Sun, 3 Dec 2017 16:32:25 -0800 Subject: [PATCH] Fixed direct editing of point in GetPoint dialog. --- src/Mod/Path/PathScripts/PathDressupTagGui.py | 3 ++- src/Mod/Path/PathScripts/PathGetPoint.py | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Mod/Path/PathScripts/PathDressupTagGui.py b/src/Mod/Path/PathScripts/PathDressupTagGui.py index 43fa3242ae..a896c4502b 100644 --- a/src/Mod/Path/PathScripts/PathDressupTagGui.py +++ b/src/Mod/Path/PathScripts/PathDressupTagGui.py @@ -233,7 +233,8 @@ class PathDressupTagTaskPanel: self.getPoint.getPoint(self.addNewTagAt) def editTagAt(self, point, obj): - if point and obj and (obj or point != FreeCAD.Vector()) and self.obj.Proxy.pointIsOnPath(self.obj, point): + PathLog.track(point, obj) + if point and self.obj.Proxy.pointIsOnPath(self.obj, point): tags = [] for i, (x, y, enabled) in enumerate(self.tags): if i == self.editItem: diff --git a/src/Mod/Path/PathScripts/PathGetPoint.py b/src/Mod/Path/PathScripts/PathGetPoint.py index a5c96a14ca..dc86fc1b1f 100644 --- a/src/Mod/Path/PathScripts/PathGetPoint.py +++ b/src/Mod/Path/PathScripts/PathGetPoint.py @@ -36,6 +36,7 @@ __url__ = "http://www.freecadweb.org" __doc__ = "Helper class to use FreeCADGUi.Snapper to let the user enter arbitray points while the task panel is active." PathLog.setLevel(PathLog.Level.INFO, PathLog.thisModule()) +#PathLog.track(PathLog.thisModule()) class TaskPanel: '''Use an instance of this class in another TaskPanel to invoke the snapper. @@ -180,6 +181,7 @@ class TaskPanel: self.formOrig.setFocus() if ok: + self.updatePoint(False) self.pointWhenDone(self.pt, self.obj) else: self.pointWhenDone(None, None) @@ -211,9 +213,9 @@ class TaskPanel: self.pointCbMove = None self.view = None - def updatePoint(self): + def updatePoint(self, usePoint = True): '''updatePoint() ... internal function - do not call.''' - if self.point: + if usePoint and self.point: self.pt = self.point else: x = FreeCAD.Units.Quantity(self.formPoint.globalX.text()).Value