diff --git a/src/Gui/GuiApplicationNativeEventAware.cpp b/src/Gui/GuiApplicationNativeEventAware.cpp index 42e8ded33c..9e02558875 100644 --- a/src/Gui/GuiApplicationNativeEventAware.cpp +++ b/src/Gui/GuiApplicationNativeEventAware.cpp @@ -59,11 +59,15 @@ Gui::GUIApplicationNativeEventAware::~GUIApplicationNativeEventAware() = default void Gui::GUIApplicationNativeEventAware::initSpaceball(QMainWindow *window) { #if defined(_USE_3DCONNEXION_SDK) || defined(SPNAV_FOUND) +# if defined(USE_3DCONNEXION_NAVLIB) ParameterGrp::handle hViewGrp = App::GetApplication().GetParameterGroupByPath( "User parameter:BaseApp/Preferences/View"); if (nativeEvent && hViewGrp->GetBool("LegacySpaceMouseDevices", false)) { nativeEvent->initSpaceball(window); } +# else + nativeEvent->initSpaceball(window); +# endif #else Q_UNUSED(window); #endif diff --git a/src/Gui/PreferencePages/DlgSettingsNavigation.cpp b/src/Gui/PreferencePages/DlgSettingsNavigation.cpp index a1df77b0a8..6a56a33d8f 100644 --- a/src/Gui/PreferencePages/DlgSettingsNavigation.cpp +++ b/src/Gui/PreferencePages/DlgSettingsNavigation.cpp @@ -62,6 +62,9 @@ DlgSettingsNavigation::DlgSettingsNavigation(QWidget* parent) retranslate(); #if !defined(_USE_3DCONNEXION_SDK) && !defined(SPNAV_FOUND) ui->legacySpaceMouseDevices->setDisabled(true); +#elif !defined(USE_3DCONNEXION_NAVLIB) + ui->spaceMouseDevice->setHidden(true); + ui->legacySpaceMouseDevices->setHidden(true); #endif } diff --git a/src/Gui/View3DInventorViewer.cpp b/src/Gui/View3DInventorViewer.cpp index cd21a948d5..00bc181768 100644 --- a/src/Gui/View3DInventorViewer.cpp +++ b/src/Gui/View3DInventorViewer.cpp @@ -567,11 +567,15 @@ void View3DInventorViewer::init() //filter a few qt events viewerEventFilter = new ViewerEventFilter; installEventFilter(viewerEventFilter); +#if defined(USE_3DCONNEXION_NAVLIB) ParameterGrp::handle hViewGrp = App::GetApplication().GetParameterGroupByPath( "User parameter:BaseApp/Preferences/View"); if (hViewGrp->GetBool("LegacySpaceMouseDevices", false)) { getEventFilter()->registerInputDevice(new SpaceNavigatorDevice); } +#else + getEventFilter()->registerInputDevice(new SpaceNavigatorDevice); +#endif getEventFilter()->registerInputDevice(new GesturesDevice(this)); try{