diff --git a/src/Mod/Assembly/Gui/ViewProviderAssembly.cpp b/src/Mod/Assembly/Gui/ViewProviderAssembly.cpp index 99ea82ca0a..c880f5875d 100644 --- a/src/Mod/Assembly/Gui/ViewProviderAssembly.cpp +++ b/src/Mod/Assembly/Gui/ViewProviderAssembly.cpp @@ -1221,8 +1221,8 @@ void ViewProviderAssembly::onSelectionChanged(const Gui::SelectionChanges& msg) auto selection = Gui::Selection().getSelection(); if (selection.size() == 1) { App::DocumentObject* obj = selection[0].pObject; - // A simple way to identify a joint is to check for its "JointType" property. - if (obj && obj->getPropertyByName("JointType")) { + if (obj + && (obj->getPropertyByName("JointType") || obj->getPropertyByName("ObjectToGround"))) { isolateJointReferences(obj); return; } @@ -1517,6 +1517,18 @@ void ViewProviderAssembly::isolateJointReferences(App::DocumentObject* joint, Is return; } + if (auto* prop = joint->getPropertyByName("ObjectToGround")) { + auto* groundedObj = prop->getValue(); + + isolatedJoint = joint; + isolatedJointVisibilityBackup = joint->Visibility.getValue(); + joint->Visibility.setValue(true); + + std::set isolateSet = {groundedObj}; + isolateComponents(isolateSet, mode); + return; + } + App::DocumentObject* part1 = getMovingPartFromRef(joint, "Reference1"); App::DocumentObject* part2 = getMovingPartFromRef(joint, "Reference2"); if (!part1 || !part2) {