FEM: Purge tool deletes all result objects. Fixes #23028

- Correctly deletes children of pipeline without error on delete
- Ensures visualizations are also deleted as they are result objects too
- Ensures purge tool uses a transaction, like all tools should
This commit is contained in:
Stefan Tröger
2025-08-17 18:29:31 +02:00
parent b6d0819618
commit 3dd39db073
4 changed files with 11 additions and 5 deletions

View File

@@ -109,11 +109,8 @@ App::DocumentObject* FemPostGroupExtension::getGroupOfObject(const App::Document
void FemPostGroupExtension::onExtendedUnsetupObject()
{
// remove all children!
auto document = getExtendedObject()->getDocument();
for (const auto& obj : Group.getValues()) {
document->removeObject(obj->getNameInDocument());
}
// remove all children (if not already removed)!
removeObjectsFromDocument();
}
bool FemPostGroupExtension::allowObject(App::DocumentObject* obj)