Gui: Add runtime check to choose between modern and legacy space mouse devices
This commit is contained in:
@@ -559,8 +559,15 @@ Application::Application(bool GUIenabled)
|
||||
_pcWorkbenchDictionary = PyDict_New();
|
||||
|
||||
#ifdef USE_3DCONNEXION_NAVLIB
|
||||
// Instantiate the 3Dconnexion controller
|
||||
pNavlibInterface = new NavlibInterface();
|
||||
ParameterGrp::handle hViewGrp = App::GetApplication().GetParameterGroupByPath(
|
||||
"User parameter:BaseApp/Preferences/View");
|
||||
if (!hViewGrp->GetBool("LegacySpaceMouseDevices", false)) {
|
||||
// Instantiate the 3Dconnexion controller
|
||||
pNavlibInterface = new NavlibInterface();
|
||||
}
|
||||
else {
|
||||
pNavlibInterface = nullptr;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (GUIenabled) {
|
||||
@@ -2293,7 +2300,9 @@ void Application::runApplication()
|
||||
Gui::getMainWindow()->setProperty("eventLoop", true);
|
||||
|
||||
#ifdef USE_3DCONNEXION_NAVLIB
|
||||
Instance->pNavlibInterface->enableNavigation();
|
||||
if (Instance->pNavlibInterface) {
|
||||
Instance->pNavlibInterface->enableNavigation();
|
||||
}
|
||||
#endif
|
||||
|
||||
runEventLoop(mainApp);
|
||||
|
||||
Reference in New Issue
Block a user