Assembly: Fix dragger when assembly is transformed

This commit is contained in:
PaddleStroke
2025-10-06 14:36:13 +02:00
committed by Chris Hennes
parent 68f083a6d1
commit 94fb19d9be

View File

@@ -1105,6 +1105,13 @@ void ViewProviderAssembly::draggerMotionCallback(void* data, SoDragger* d)
Base::Placement draggerPlc = sudoThis->getDraggerPlacement();
Base::Placement movePlc = draggerPlc * sudoThis->draggerInitPlc.inverse();
// Transform the global delta `movePlc` in case the assembly is transformed.
Base::Placement asmPlc =
App::GeoFeature::getGlobalPlacement(sudoThis->getObject<AssemblyObject>());
if (!asmPlc.isIdentity()) {
movePlc = asmPlc.inverse() * movePlc * asmPlc;
}
for (auto& movingObj : sudoThis->docsToMove) {
App::DocumentObject* obj = movingObj.obj;