Assembly: Backport 27567 (#27628)

This commit is contained in:
PaddleStroke
2026-02-16 10:43:16 -06:00
committed by GitHub
parent 6b1823931e
commit 01893cbbe5
@@ -1205,6 +1205,14 @@ void ViewProviderAssembly::draggerMotionCallback(void* data, SoDragger* d)
void ViewProviderAssembly::onSelectionChanged(const Gui::SelectionChanges& msg)
{
// onSelectionChanged is called from both Selection.cpp and SelectionObserver.
// In the case where you have nested assemblies, that would cause issues. See #27532
bool singleAssembly
= getDocument()->getDocument()->getObjectsOfType<Assembly::AssemblyObject>().size() == 1;
if (!isInEditMode() && !singleAssembly) {
return;
}
// Joint components isolation
if (msg.Type == Gui::SelectionChanges::AddSelection) {
auto selection = Gui::Selection().getSelection();
@@ -1498,6 +1506,8 @@ void ViewProviderAssembly::isolateJointReferences(App::DocumentObject* joint, Is
return;
}
clearIsolate();
App::DocumentObject* part1 = getMovingPartFromRef(joint, "Reference1");
App::DocumentObject* part2 = getMovingPartFromRef(joint, "Reference2");
if (!part1 || !part2) {