From 1182e38fd12e4853037db3a8ffc6f1e8409d43fc Mon Sep 17 00:00:00 2001 From: David Kaufman Date: Sun, 7 Sep 2025 09:38:36 -0400 Subject: [PATCH] [CAM] add missing migration from intermediate version for lead in/out dressup --- src/Mod/CAM/Path/Dressup/Gui/LeadInOut.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Mod/CAM/Path/Dressup/Gui/LeadInOut.py b/src/Mod/CAM/Path/Dressup/Gui/LeadInOut.py index 7eca7130d8..29714a9ab5 100644 --- a/src/Mod/CAM/Path/Dressup/Gui/LeadInOut.py +++ b/src/Mod/CAM/Path/Dressup/Gui/LeadInOut.py @@ -280,7 +280,12 @@ class ObjectDressup: obj.AngleOut = 90 if styleOff == "Perpendicular" else 0 toolRadius = PathDressup.toolController(obj.Base).Tool.Diameter.Value / 2 - if hasattr(obj, "Length"): + if hasattr(obj, "Length") or hasattr(obj, "LengthIn"): + oldLength = obj.LengthIn if hasattr(obj, "LengthIn") else obj.Length + for prop in ["Length", "LengthIn"]: + if hasattr(obj, prop): + obj.removeProperty(prop) + # Replace Length by PercentageRadiusIn obj.addProperty( "App::PropertyInteger", @@ -288,8 +293,7 @@ class ObjectDressup: "Path Lead-in", QT_TRANSLATE_NOOP("App::Property", "Determine length of the Lead-In"), ) - obj.PercentageRadiusIn = int(obj.Length / toolRadius * 100) - obj.removeProperty("Length") + obj.PercentageRadiusIn = int(oldLength / toolRadius * 100) if hasattr(obj, "LengthOut"): # Replace LengthOut by PercentageRadiusOut obj.addProperty(