From bb74a6b2b8a1ff396c08e9faf58ecb23354e57d6 Mon Sep 17 00:00:00 2001 From: Uwe Date: Wed, 30 Mar 2022 01:45:59 +0200 Subject: [PATCH] [FEM] [skip CI] remove superfluous ifs I introduced today --- .../Fem/Gui/ViewProviderFemPostFunction.cpp | 24 ++++++++----------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/src/Mod/Fem/Gui/ViewProviderFemPostFunction.cpp b/src/Mod/Fem/Gui/ViewProviderFemPostFunction.cpp index 65064d6230..0eb3282079 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemPostFunction.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemPostFunction.cpp @@ -581,20 +581,16 @@ void ViewProviderFemPostSphereFunction::updateData(const App::Property* p) { if (p == &func->Center || p == &func->Radius) { auto directParents = func->getInList(); // directParents is at the level of the functions container, so we must read the parent of this container - if (!directParents.empty()) { - for (auto obj : directParents) { - if (obj->getTypeId() == Base::Type::fromName("Fem::FemPostFunctionProvider")) { - auto outerParents = obj->getInList(); - if (!outerParents.empty()) { - for (auto objOuter : outerParents) { - if (objOuter->getTypeId() == Base::Type::fromName("Fem::FemPostPipeline") ) { - if (!isDragging()) - // not recursve, otherwise VTK will show an error on initialization - objOuter->recomputeFeature(); - else - objOuter->recomputeFeature(true); - } - } + for (auto obj : directParents) { + if (obj->getTypeId() == Base::Type::fromName("Fem::FemPostFunctionProvider")) { + auto outerParents = obj->getInList(); + for (auto objOuter : outerParents) { + if (objOuter->getTypeId() == Base::Type::fromName("Fem::FemPostPipeline") ) { + if (!isDragging()) + // not recursve, otherwise VTK will show an error on initialization + objOuter->recomputeFeature(); + else + objOuter->recomputeFeature(true); } } }