Skip to content

Commit 3804117

Browse files
committed
Gui: Disable spacemouse init if not legacy
1 parent f84052c commit 3804117

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Gui/GuiApplicationNativeEventAware.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,11 @@ Gui::GUIApplicationNativeEventAware::~GUIApplicationNativeEventAware() = default
5959
void Gui::GUIApplicationNativeEventAware::initSpaceball(QMainWindow *window)
6060
{
6161
#if defined(_USE_3DCONNEXION_SDK) || defined(SPNAV_FOUND)
62-
nativeEvent->initSpaceball(window);
62+
ParameterGrp::handle hViewGrp = App::GetApplication().GetParameterGroupByPath(
63+
"User parameter:BaseApp/Preferences/View");
64+
if (nativeEvent && hViewGrp->GetBool("LegacySpaceMouseDevices", false)) {
65+
nativeEvent->initSpaceball(window);
66+
}
6367
#else
6468
Q_UNUSED(window);
6569
#endif

0 commit comments

Comments
 (0)