Fix spnav not enabled by default on linux after #19226 and #19407

This commit is contained in:
Adrian Insaurralde
2025-02-16 17:44:56 -03:00
parent 145af5cddc
commit a862071e3e
2 changed files with 8 additions and 0 deletions

View File

@@ -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{