From 3208b6de5f08faeda57c1b7a3cb3e973daa04bdf Mon Sep 17 00:00:00 2001 From: Chris Hennes Date: Wed, 10 Dec 2025 13:30:05 -0600 Subject: [PATCH] PD: Don't warn about Midplane on document load --- src/Mod/PartDesign/App/FeatureExtrude.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Mod/PartDesign/App/FeatureExtrude.cpp b/src/Mod/PartDesign/App/FeatureExtrude.cpp index c778cd7e8b..f3bbe0013d 100644 --- a/src/Mod/PartDesign/App/FeatureExtrude.cpp +++ b/src/Mod/PartDesign/App/FeatureExtrude.cpp @@ -131,13 +131,16 @@ bool FeatureExtrude::hasTaperedAngle() const void FeatureExtrude::onChanged(const App::Property* prop) { - if (prop == &Midplane) { + if (!isRestoring() && prop == &Midplane) { // Deprecation notice: Midplane property is deprecated and has been replaced by SideType in // FreeCAD 1.1 when FeatureExtrude was refactored. + App::DocumentObject* obj = Profile.getValue(); + auto baseName = obj ? obj->getNameInDocument() : ""; Base::Console().warning( - "The 'Midplane' property is deprecated and has been replaced by the 'SideType' " - "property in FeatureExtrude. Please update your script, this property will be " - "removed in a future version.\n" + "The 'Midplane' property being set for the extrusion of %s is deprecated and has " + "been replaced by the 'SideType' property in FeatureExtrude. Please update your script," + " this property will be removed in a future version.\n", + baseName ); if (Midplane.getValue()) { SideType.setValue("Symmetric"); @@ -949,7 +952,6 @@ void FeatureExtrude::onDocumentRestored() SideType.setValue("Two sides"); } else if (Midplane.getValue()) { - // This code is probably now dead, replaced by the onChanged watcher for the Midplane value Midplane.setValue(false); SideType.setValue("Symmetric"); }