FEM: Modernize multiframe code and incorporate review feedback

This commit is contained in:
Stefan Tröger
2025-02-21 19:04:52 +01:00
committed by Benjamin Nauck
parent 0a1cc21b5c
commit 9738b9b6ea
15 changed files with 80 additions and 149 deletions

View File

@@ -41,7 +41,7 @@ FemPostFunctionProvider::~FemPostFunctionProvider() = default;
bool FemPostFunctionProvider::allowObject(App::DocumentObject* obj)
{
return obj->isDerivedFrom(FemPostFunction::getClassTypeId());
return obj->isDerivedFrom<FemPostFunction>();
}
void FemPostFunctionProvider::unsetupObject()
@@ -60,11 +60,8 @@ void FemPostFunctionProvider::handleChangedPropertyName(Base::XMLReader& reader,
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());
// restore the property into Group, instead of the old Functions property
Group.Restore(reader);
}
else {
App::DocumentObject::handleChangedPropertyName(reader, typeName, propName);