diff --git a/src/Mod/Fem/Gui/ViewProviderFemPostFunction.cpp b/src/Mod/Fem/Gui/ViewProviderFemPostFunction.cpp index 336ff942cabd..65064d623060 100644 --- a/src/Mod/Fem/Gui/ViewProviderFemPostFunction.cpp +++ b/src/Mod/Fem/Gui/ViewProviderFemPostFunction.cpp @@ -576,14 +576,36 @@ void ViewProviderFemPostSphereFunction::updateData(const App::Property* p) { getManipulator()->setMatrix(t); } Gui::ViewProviderDocumentObject::updateData(p); -} + // after updating the geometry we must recompute the pipeline the sphere is in + 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); + } + } + } + } + } + } + } +} FunctionWidget* ViewProviderFemPostSphereFunction::createControlWidget() { return new SphereWidget(); } - SphereWidget::SphereWidget() { ui = new Ui_SphereWidget();