From bbd1266398aa88dcf9750fb52b060a7e779088ea Mon Sep 17 00:00:00 2001 From: PaddleStroke Date: Wed, 4 Mar 2026 16:38:45 +0100 Subject: [PATCH] PartDesign: Fix wireframe not working on external link to body --- src/Mod/PartDesign/Gui/ViewProviderBody.cpp | 23 +++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/Mod/PartDesign/Gui/ViewProviderBody.cpp b/src/Mod/PartDesign/Gui/ViewProviderBody.cpp index b6631999b4..e8e6e487a0 100644 --- a/src/Mod/PartDesign/Gui/ViewProviderBody.cpp +++ b/src/Mod/PartDesign/Gui/ViewProviderBody.cpp @@ -113,6 +113,29 @@ void ViewProviderBody::setOverrideMode(const std::string& mode) } else { overrideMode = mode; + + // Propagate the override mode to child features. + // When the Body is an external link, the global viewport loop + // won't reach these children automatically. + if (pcObject && !isRestoring()) { + Gui::Document* gdoc = Gui::Application::Instance->getDocument(pcObject->getDocument()); + if (gdoc) { + PartDesign::Body* body = static_cast(getObject()); + auto features = body->Group.getValues(); + for (auto feature : features) { + if (feature && feature->isDerivedFrom()) { + if (Gui::ViewProvider* vp = gdoc->getViewProvider(feature)) { + vp->setOverrideMode(mode); + } + } + } + if (App::DocumentObject* base = body->BaseFeature.getValue()) { + if (Gui::ViewProvider* vp = gdoc->getViewProvider(base)) { + vp->setOverrideMode(mode); + } + } + } + } } }