From a17645aa05e6aab6800b5fbbeb8145c6fd9a0a87 Mon Sep 17 00:00:00 2001 From: Gabriel Wicke Date: Sun, 17 May 2020 16:53:09 -0700 Subject: [PATCH 1/2] [path] Small fix in PathOpGui Fix a bad call to page.updateVisibility --- src/Mod/Path/PathScripts/PathOpGui.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Path/PathScripts/PathOpGui.py b/src/Mod/Path/PathScripts/PathOpGui.py index c2098c7ab1..8c6cc532de 100644 --- a/src/Mod/Path/PathScripts/PathOpGui.py +++ b/src/Mod/Path/PathScripts/PathOpGui.py @@ -401,7 +401,7 @@ class TaskPanelPage(object): for page in parent.featurePages: if hasattr(page, 'panelTitle'): if page.panelTitle == panelTitle and hasattr(page, 'updateVisibility'): - page.updateVisibility(obj) + page.updateVisibility() break From 94cff2135ed5845a31c434ad4ea44a7ee463b6e7 Mon Sep 17 00:00:00 2001 From: Russell Johnson <47639332+Russ4262@users.noreply.github.com> Date: Sun, 17 May 2020 21:14:16 -0500 Subject: [PATCH 2/2] Extend fix to `updateVisibility()` call Call originates in PathOpGui module. --- src/Mod/Path/PathScripts/PathProfileGui.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/Mod/Path/PathScripts/PathProfileGui.py b/src/Mod/Path/PathScripts/PathProfileGui.py index 3e4ea54c9a..57bbde4ff9 100644 --- a/src/Mod/Path/PathScripts/PathProfileGui.py +++ b/src/Mod/Path/PathScripts/PathProfileGui.py @@ -51,7 +51,7 @@ class TaskPanelOpPage(PathOpGui.TaskPanelPage): ''' def initPage(self, obj): - self.updateVisibility(obj) + self.updateVisibility() def profileFeatures(self): '''profileFeatures() ... return which of the optional profile features are supported. @@ -107,7 +107,7 @@ class TaskPanelOpPage(PathOpGui.TaskPanelPage): self.form.processPerimeter.setChecked(obj.processPerimeter) self.form.processCircles.setChecked(obj.processCircles) - self.updateVisibility(obj) + self.updateVisibility() def getSignalsForUpdate(self, obj): '''getSignalsForUpdate(obj) ... return list of signals for updating obj''' @@ -126,16 +126,13 @@ class TaskPanelOpPage(PathOpGui.TaskPanelPage): return signals - def updateVisibility(self, sentObj=None): + def updateVisibility(self): hasFace = False hasGeom = False fullModel = False objBase = list() - if sentObj: - if hasattr(sentObj, 'Base'): - objBase = sentObj.Base - elif hasattr(self.obj, 'Base'): + if hasattr(self.obj, 'Base'): objBase = self.obj.Base if objBase.__len__() > 0: