Assembly: Fix infinite loop with subassembly. Fix #19319 (#22685)

* Assembly: Fix infinite loop with subassembly. Fix #19319

* squash

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update AssemblyObject.h

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
PaddleStroke
2025-07-25 00:11:24 +02:00
committed by GitHub
parent 983ec3815c
commit e141cb7a49
3 changed files with 28 additions and 40 deletions

View File

@@ -763,6 +763,8 @@ ViewProviderAssembly::DragMode ViewProviderAssembly::findDragMode()
// If fixed joint we need to find the upstream joint to find move mode.
// For example : Gnd -(revolute)- A -(fixed)- B : if user try to move B, then we should
// actually move A
movingJoint = nullptr; // reinitialize because getUpstreamMovingPart will call
// getJointOfPartConnectingToGround again which will find the same joint.
auto* upPart =
assemblyPart->getUpstreamMovingPart(docsToMove[0].obj, movingJoint, pName);
if (!movingJoint) {