Gui: [skip ci] Fix navigation styles

If a joystick is connected events of type Spaceball::MotionEvent might be emitted but the last saved mouse position is not passed to the SoMotion3Event and thus will lead to problems while panning.

See also: https://forum.freecadweb.org/viewtopic.php?f=3&t=50628 and https://github.com/FreeCAD/FreeCAD/pull/3902
This commit is contained in:
wmayer
2020-11-21 10:15:13 +01:00
parent f653694655
commit 99e9b4db1c

View File

@@ -337,12 +337,13 @@ public:
SoMotion3Event* motion3Event = new SoMotion3Event;
motion3Event->setTranslation(translationVector);
motion3Event->setRotation(xRot * yRot * zRot);
motion3Event->setPosition(this->mousepos);
return motion3Event;
}
return NULL;
};
}
};
/** \defgroup View3D 3D Viewer