From 3eb300a8c22745ab968f3d6e553249bdcd3a01d5 Mon Sep 17 00:00:00 2001 From: sliptonic Date: Sat, 28 Nov 2020 10:15:11 -0600 Subject: [PATCH] fix ui bugs --- src/Mod/Path/Gui/Resources/panels/PageOpVcarveEdit.ui | 2 +- src/Mod/Path/PathScripts/PathVcarve.py | 8 ++++---- src/Mod/Path/PathScripts/PathVcarveGui.py | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Mod/Path/Gui/Resources/panels/PageOpVcarveEdit.ui b/src/Mod/Path/Gui/Resources/panels/PageOpVcarveEdit.ui index 038b37c892..d0b2e52b92 100644 --- a/src/Mod/Path/Gui/Resources/panels/PageOpVcarveEdit.ui +++ b/src/Mod/Path/Gui/Resources/panels/PageOpVcarveEdit.ui @@ -100,7 +100,7 @@ - + <html><head/><body><p>Controls how aggressively colinear segments are filtered from the voronoi diagram</p><p>Valid values are 0 - 90 degrees (larger numbers filter more)</p><p>Default = 10</p><p><br/></p></body></html> diff --git a/src/Mod/Path/PathScripts/PathVcarve.py b/src/Mod/Path/PathScripts/PathVcarve.py index 51609933a0..f380635882 100644 --- a/src/Mod/Path/PathScripts/PathVcarve.py +++ b/src/Mod/Path/PathScripts/PathVcarve.py @@ -179,13 +179,13 @@ class ObjectVcarve(PathEngraveBase.ObjectOp): obj.addProperty("App::PropertyFloat", "Discretize", "Path", QtCore.QT_TRANSLATE_NOOP("PathVcarve", "The deflection value for discretizing arcs")) - obj.addProperty("App::PropertyFloat", "Threshold", "Path", + obj.addProperty("App::PropertyFloat", "Colinear", "Path", QtCore.QT_TRANSLATE_NOOP("PathVcarve", - "cutoff for removing colinear segments (degrees). \ + "Cutoff for removing colinear segments (degrees). \ default=10.0.")) obj.addProperty("App::PropertyFloat", "Tolerance", "Path", QtCore.QT_TRANSLATE_NOOP("PathVcarve", "")) - obj.Threshold = 10.0 + obj.Colinear = 10.0 obj.Discretize = 0.01 obj.Tolerance = PathPreferences.defaultGeometryTolerance() self.setupAdditionalProperties(obj) @@ -261,7 +261,7 @@ class ObjectVcarve(PathEngraveBase.ObjectOp): vd.colorExterior(EXTERIOR2, lambda v: not f.isInside(v.toPoint(f.BoundBox.ZMin), obj.Tolerance, True)) - vd.colorColinear(COLINEAR, obj.Threshold) + vd.colorColinear(COLINEAR, obj.Colinear) vd.colorTwins(TWIN) wires = _collectVoronoiWires(vd); diff --git a/src/Mod/Path/PathScripts/PathVcarveGui.py b/src/Mod/Path/PathScripts/PathVcarveGui.py index d2823939d7..60910d5d9a 100644 --- a/src/Mod/Path/PathScripts/PathVcarveGui.py +++ b/src/Mod/Path/PathScripts/PathVcarveGui.py @@ -120,15 +120,15 @@ class TaskPanelOpPage(PathOpGui.TaskPanelPage): '''getFields(obj) ... transfers values from UI to obj's proprties''' if obj.Discretize != self.form.discretize.value(): obj.Discretize = self.form.discretize.value() - if obj.Threshold != self.form.threshold.value(): - obj.Threshold = self.form.threshold.value() + if obj.Colinear != self.form.colinearFilter.value(): + obj.Colinear = self.form.colinearFilter.value() self.updateToolController(obj, self.form.toolController) self.updateCoolant(obj, self.form.coolantController) def setFields(self, obj): '''setFields(obj) ... transfers obj's property values to UI''' self.form.discretize.setValue(obj.Discretize) - self.form.threshold.setValue(obj.Threshold) + self.form.colinearFilter.setValue(obj.Colinear) self.setupToolController(obj, self.form.toolController) self.setupCoolant(obj, self.form.coolantController) @@ -136,7 +136,7 @@ class TaskPanelOpPage(PathOpGui.TaskPanelPage): '''getSignalsForUpdate(obj) ... return list of signals for updating obj''' signals = [] signals.append(self.form.discretize.editingFinished) - signals.append(self.form.threshold.editingFinished) + signals.append(self.form.colinearFilter.editingFinished) signals.append(self.form.toolController.currentIndexChanged) signals.append(self.form.coolantController.currentIndexChanged) return signals