From 4f58bbf7a240ffe4f3e3bca56046d1b46222909f Mon Sep 17 00:00:00 2001 From: Russell Johnson <47639332+Russ4262@users.noreply.github.com> Date: Thu, 26 Mar 2020 18:07:02 -0500 Subject: [PATCH] Path: Add `initPage()` call to update GUI upon loading Added initPage() function call updates task panel values and visibilities when user edits an existing operation. --- src/Mod/Path/PathScripts/PathSurfaceGui.py | 5 ++++- src/Mod/Path/PathScripts/PathWaterlineGui.py | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Mod/Path/PathScripts/PathSurfaceGui.py b/src/Mod/Path/PathScripts/PathSurfaceGui.py index f11bdd4864..5709c0341e 100644 --- a/src/Mod/Path/PathScripts/PathSurfaceGui.py +++ b/src/Mod/Path/PathScripts/PathSurfaceGui.py @@ -39,6 +39,10 @@ __doc__ = "Surface operation page controller and command implementation." class TaskPanelOpPage(PathOpGui.TaskPanelPage): '''Page controller class for the Surface operation.''' + def initPage(self, obj): + self.setTitle("3D Surface") + self.updateVisibility() + def getForm(self): '''getForm() ... returns UI''' return FreeCADGui.PySideUic.loadUi(":/panels/PageOpSurfaceEdit.ui") @@ -110,7 +114,6 @@ class TaskPanelOpPage(PathOpGui.TaskPanelPage): else: self.form.optimizeStepOverTransitions.setCheckState(QtCore.Qt.Unchecked) - def getSignalsForUpdate(self, obj): '''getSignalsForUpdate(obj) ... return list of signals for updating obj''' signals = [] diff --git a/src/Mod/Path/PathScripts/PathWaterlineGui.py b/src/Mod/Path/PathScripts/PathWaterlineGui.py index 7a631efd11..cf72300d46 100644 --- a/src/Mod/Path/PathScripts/PathWaterlineGui.py +++ b/src/Mod/Path/PathScripts/PathWaterlineGui.py @@ -40,6 +40,10 @@ __doc__ = "Waterline operation page controller and command implementation." class TaskPanelOpPage(PathOpGui.TaskPanelPage): '''Page controller class for the Waterline operation.''' + def initPage(self, obj): + # self.setTitle("Waterline") + self.updateVisibility() + def getForm(self): '''getForm() ... returns UI''' return FreeCADGui.PySideUic.loadUi(":/panels/PageOpWaterlineEdit.ui")