PD: Don't warn about Midplane on document load
This commit is contained in:
committed by
Kacper Donat
parent
1c8df498f3
commit
3208b6de5f
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user