From 27806651b443feea2ade76de2a3198618b061420 Mon Sep 17 00:00:00 2001 From: PaddleStroke Date: Tue, 23 Sep 2025 16:05:40 +0200 Subject: [PATCH] Assembly: Fix subassembly linkgroups not moving with dragger --- src/Mod/Assembly/Gui/ViewProviderAssembly.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Mod/Assembly/Gui/ViewProviderAssembly.cpp b/src/Mod/Assembly/Gui/ViewProviderAssembly.cpp index 66b83809f7..ded0760124 100644 --- a/src/Mod/Assembly/Gui/ViewProviderAssembly.cpp +++ b/src/Mod/Assembly/Gui/ViewProviderAssembly.cpp @@ -766,7 +766,18 @@ void ViewProviderAssembly::collectMovableObjects(App::DocumentObject* selRoot, for (auto* child : children) { // Recurse on children, appending the child's name to the subName prefix std::string newSubNamePrefix = subNamePrefix + child->getNameInDocument() + "."; - collectMovableObjects(selRoot, newSubNamePrefix, child, onlySolids); + if (child->isDerivedFrom() && child->isLinkGroup()) { + auto* link = static_cast(child); + std::vector elts = link->ElementList.getValues(); + for (auto* elt : elts) { + std::string eltSubNamePrefix = + newSubNamePrefix + elt->getNameInDocument() + "."; + collectMovableObjects(selRoot, eltSubNamePrefix, elt, onlySolids); + } + } + else { + collectMovableObjects(selRoot, newSubNamePrefix, child, onlySolids); + } } return; }