From 99e9b4db1c457da0377f2c85179fc350f9803faf Mon Sep 17 00:00:00 2001 From: wmayer Date: Sat, 21 Nov 2020 10:15:13 +0100 Subject: [PATCH] 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 --- src/Gui/View3DInventorViewer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Gui/View3DInventorViewer.cpp b/src/Gui/View3DInventorViewer.cpp index ba853256cd..9ff80e2197 100644 --- a/src/Gui/View3DInventorViewer.cpp +++ b/src/Gui/View3DInventorViewer.cpp @@ -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