Fix warning about new Profile properties NumPasses and StepOver being created automatically

This commit is contained in:
David Kaufman
2025-09-04 18:07:49 -04:00
parent d1d6846af0
commit d699d080e0

View File

@@ -313,9 +313,6 @@ class ObjectProfile(PathAreaOp.ObjectOp):
def areaOpOnDocumentRestored(self, obj):
self.propertiesReady = False
self.initAreaOpProperties(obj, warn=True)
self.areaOpSetDefaultValues(obj, PathUtils.findParentJob(obj))
self.setOpEditorProperties(obj)
if not hasattr(obj, "NumPasses"):
obj.addProperty(
"App::PropertyInteger",
@@ -326,6 +323,7 @@ class ObjectProfile(PathAreaOp.ObjectOp):
"The number of passes to do. Requires a non-zero value for Stepover",
),
)
if not hasattr(obj, "Stepover"):
obj.addProperty(
"App::PropertyDistance",
@@ -337,6 +335,10 @@ class ObjectProfile(PathAreaOp.ObjectOp):
),
)
self.initAreaOpProperties(obj, warn=True)
self.areaOpSetDefaultValues(obj, PathUtils.findParentJob(obj))
self.setOpEditorProperties(obj)
def areaOpOnChanged(self, obj, prop):
"""areaOpOnChanged(obj, prop) ... updates certain property visibilities depending on changed properties."""
if prop in ["UseComp", "JoinType", "Base"]: