From c8a4d44cf28bf5de452c2e416b845eab2834b16b Mon Sep 17 00:00:00 2001 From: Chris Hennes Date: Tue, 4 Feb 2025 10:33:04 -0600 Subject: [PATCH] Gui: Disable spacemouse init if not legacy --- src/Gui/GuiApplicationNativeEventAware.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Gui/GuiApplicationNativeEventAware.cpp b/src/Gui/GuiApplicationNativeEventAware.cpp index 2383e93a20..42e8ded33c 100644 --- a/src/Gui/GuiApplicationNativeEventAware.cpp +++ b/src/Gui/GuiApplicationNativeEventAware.cpp @@ -59,7 +59,11 @@ Gui::GUIApplicationNativeEventAware::~GUIApplicationNativeEventAware() = default void Gui::GUIApplicationNativeEventAware::initSpaceball(QMainWindow *window) { #if defined(_USE_3DCONNEXION_SDK) || defined(SPNAV_FOUND) - nativeEvent->initSpaceball(window); + ParameterGrp::handle hViewGrp = App::GetApplication().GetParameterGroupByPath( + "User parameter:BaseApp/Preferences/View"); + if (nativeEvent && hViewGrp->GetBool("LegacySpaceMouseDevices", false)) { + nativeEvent->initSpaceball(window); + } #else Q_UNUSED(window); #endif