FEM: Backward compatibility for post pipeline and multiple fixes

This commit is contained in:
Stefan Tröger
2024-12-22 15:45:17 +01:00
committed by Benjamin Nauck
parent 53a7e5ab34
commit c8a4ff0a70
16 changed files with 220 additions and 136 deletions

View File

@@ -44,7 +44,7 @@ bool FemPostFunctionProvider::allowObject(App::DocumentObject* obj)
return obj->isDerivedFrom(FemPostFunction::getClassTypeId());
}
void FemPostFunctionProvider::unsetupObject()
void FemPostFunctionProvider::unsetupObject()
{
// remove all children!
auto document = getExtendedObject()->getDocument();
@@ -53,6 +53,24 @@ void FemPostFunctionProvider::unsetupObject()
}
}
void FemPostFunctionProvider::handleChangedPropertyName(Base::XMLReader& reader,
const char* typeName,
const char* propName)
{
if (strcmp(propName, "Functions") == 0
&& Base::Type::fromName(typeName) == App::PropertyLinkList::getClassTypeId()) {
// add the formerly Functions values to the group
App::PropertyLinkList functions;
functions.setContainer(this);
functions.Restore(reader);
Group.setValues(functions.getValues());
}
else {
App::DocumentObject::handleChangedPropertyName(reader, typeName, propName);
}
}
PROPERTY_SOURCE(Fem::FemPostFunction, App::DocumentObject)
FemPostFunction::FemPostFunction() = default;