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; }