Merge pull request #19660 from adrianinsaval/fix-spnav-regression
Fix spnav not enabled by default on linux after #19226 and #19407
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user