CAM: Fix Task panels for expression in App::PropertyLink (#22955)

This commit is contained in:
tarman3
2025-09-02 19:22:32 +03:00
committed by GitHub
parent 3863ce947c
commit 341a239375

View File

@@ -1366,7 +1366,10 @@ class TaskPanel(object):
# Update properties based upon expressions in case expression value has changed
for prp, expr in self.obj.ExpressionEngine:
val = FreeCAD.Units.Quantity(self.obj.evalExpression(expr))
evalExpr = self.obj.evalExpression(expr)
if not isinstance(evalExpr, (int, float, FreeCAD.Units.Quantity)):
continue
val = FreeCAD.Units.Quantity(evalExpr)
value = val.Value if hasattr(val, "Value") else val
prop = getattr(self.obj, prp)
if hasattr(prop, "Value"):