New integration with 3Dconnexion devices (#12929)
* New integration with 3Dconnexion devices * CMake build option hidden for Mac * Minor fixes, to be squashed to previous commit * cmake: fix indent and case; to be squashed * Corrected name case --------- Co-authored-by: Patryk Skowroński <pskowronski@3dconnexion.com> Co-authored-by: Chris Hennes <chennes@pioneerlibrarysystem.org> Co-authored-by: Ladislav Michl <ladis@linux-mips.org>
This commit is contained in:
committed by
GitHub
parent
ed3e1cf544
commit
43ddbb4936
@@ -128,6 +128,7 @@
|
||||
#include "WorkbenchManager.h"
|
||||
#include "WorkbenchManipulator.h"
|
||||
#include "WidgetFactory.h"
|
||||
#include "3Dconnexion/navlib/NavlibInterface.h"
|
||||
|
||||
|
||||
using namespace Gui;
|
||||
@@ -512,6 +513,11 @@ Application::Application(bool GUIenabled)
|
||||
// instantiate the workbench dictionary
|
||||
_pcWorkbenchDictionary = PyDict_New();
|
||||
|
||||
#ifdef USE_3DCONNEXION_NAVLIB
|
||||
// Instantiate the 3Dconnexion controller
|
||||
pNavlibInterface = new NavlibInterface();
|
||||
#endif
|
||||
|
||||
if (GUIenabled) {
|
||||
createStandardOperations();
|
||||
MacroCommand::load();
|
||||
@@ -521,6 +527,9 @@ Application::Application(bool GUIenabled)
|
||||
Application::~Application()
|
||||
{
|
||||
Base::Console().Log("Destruct Gui::Application\n");
|
||||
#ifdef USE_3DCONNEXION_NAVLIB
|
||||
delete pNavlibInterface;
|
||||
#endif
|
||||
WorkbenchManager::destruct();
|
||||
WorkbenchManipulator::removeAll();
|
||||
SelectionSingleton::destruct();
|
||||
@@ -2120,6 +2129,10 @@ void Application::runApplication()
|
||||
// https://forum.freecad.org/viewtopic.php?f=10&t=21665
|
||||
Gui::getMainWindow()->setProperty("eventLoop", true);
|
||||
|
||||
#ifdef USE_3DCONNEXION_NAVLIB
|
||||
Instance->pNavlibInterface->enableNavigation();
|
||||
#endif
|
||||
|
||||
runEventLoop(mainApp);
|
||||
|
||||
Base::Console().Log("Finish: Event loop left\n");
|
||||
|
||||
Reference in New Issue
Block a user