From 0c811ecad90199285e8218fecbffe218ebf3253d Mon Sep 17 00:00:00 2001 From: Russell Johnson <47639332+Russ4262@users.noreply.github.com> Date: Mon, 14 Feb 2022 23:40:23 -0600 Subject: [PATCH] Path: Correct restoration of property enumerations Correct method call to new class method `propertyEnumerations()` as determined with recent translation fixes in Path workbench. --- src/Mod/Path/PathScripts/PathSurface.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/Mod/Path/PathScripts/PathSurface.py b/src/Mod/Path/PathScripts/PathSurface.py index 1b39e936da..84b83e5051 100644 --- a/src/Mod/Path/PathScripts/PathSurface.py +++ b/src/Mod/Path/PathScripts/PathSurface.py @@ -433,7 +433,7 @@ class ObjectSurface(PathOp.ObjectOp): ] @classmethod - def propertyEnumerations(self, dataType="data"): + def propertyEnumerations(cls, dataType="data"): """propertyEnumerations(dataType="data")... return property enumeration lists of specified dataType. Args: dataType = 'data', 'raw', 'translated' @@ -607,15 +607,14 @@ class ObjectSurface(PathOp.ObjectOp): obj.setEditorMode("ShowTempObjects", mode) # Repopulate enumerations in case of changes - ENUMS = self.opPropertyEnumerations() - for n in ENUMS: + for prop, enums in ObjectSurface.propertyEnumerations(): restore = False - if hasattr(obj, n): - val = obj.getPropertyByName(n) + if hasattr(obj, prop): + val = obj.getPropertyByName(prop) restore = True - setattr(obj, n, ENUMS[n]) + setattr(obj, prop, enums) if restore: - setattr(obj, n, val) + setattr(obj, prop, val) self.setEditorProperties(obj)