From 7d9129445b891b97e138bd9f8234c46ec7b26411 Mon Sep 17 00:00:00 2001 From: abn Date: Tue, 30 Sep 2014 16:01:09 +0200 Subject: [PATCH] Fixed linking issue. Removed "paraview.fromGUI" flag. --- src/LightApp/CMakeLists.txt | 3 +++ src/PVViewer/CMakeLists.txt | 4 ++-- src/PVViewer/PVViewer_ViewManager.cxx | 15 +-------------- 3 files changed, 6 insertions(+), 16 deletions(-) diff --git a/src/LightApp/CMakeLists.txt b/src/LightApp/CMakeLists.txt index ea154893a..c6fe94f9b 100755 --- a/src/LightApp/CMakeLists.txt +++ b/src/LightApp/CMakeLists.txt @@ -130,6 +130,9 @@ ENDIF() IF(SALOME_USE_QXGRAPHVIEWER) LIST(APPEND _link_LIBRARIES QxScene) ENDIF() +IF(SALOME_USE_PVVIEWER) + LIST(APPEND _link_LIBRARIES PVViewer) +ENDIF() IF(SALOME_USE_PYCONSOLE) LIST(APPEND _link_LIBRARIES PyInterp PyConsole SUITApp) ENDIF() diff --git a/src/PVViewer/CMakeLists.txt b/src/PVViewer/CMakeLists.txt index c6f341e28..a34abb3cb 100644 --- a/src/PVViewer/CMakeLists.txt +++ b/src/PVViewer/CMakeLists.txt @@ -44,8 +44,8 @@ ADD_DEFINITIONS(${KERNEL_DEFINITIONS}) ADD_DEFINITIONS(${OMNIORB_DEFINITIONS}) SET(_link_LIBRARIES - ${KERNEL_LDFLAGS} ${KERNEL_SALOMELocalTrace} - ${GUI_LDFLAGS} ${GUI_SalomeApp} ${GUI_LightApp} ${GUI_suit} ${GUI_Event} + ${KERNEL_LDFLAGS} ${KERNEL_SALOMELocalTrace} ${KERNEL_OpUtil} + ${GUI_LDFLAGS} suit Event PyInterp ${_PARAVIEW_APP_COMPO_LIB} ) diff --git a/src/PVViewer/PVViewer_ViewManager.cxx b/src/PVViewer/PVViewer_ViewManager.cxx index a0c819edd..31e5ab634 100644 --- a/src/PVViewer/PVViewer_ViewManager.cxx +++ b/src/PVViewer/PVViewer_ViewManager.cxx @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -112,20 +113,6 @@ bool PVViewer_ViewManager::ParaviewInitApp(SUIT_Desktop * aDesktop) new pqTabbedMultiViewWidget(); // registers a "MULTIVIEW_WIDGET" on creation - // At this stage, the pqPythonManager has been initialized, i.e. the current process has - // activated the embedded Python interpreter. "paraview" package has also been imported once already. - // Make sure the current process executes paraview's Python command with the "fromGUI" flag. - // This is used in pvsimple.py to avoid reconnecting the GUI thread to the pvserver (when - // user types "import pvsimple" in SALOME's console). - SalomeApp_Application* app = - dynamic_cast< SalomeApp_Application* >(SUIT_Session::session()->activeApplication()); - PyConsole_Interp* pyInterp = app->pythonConsole()->getInterp(); - { - PyLockWrapper aGil; - std::string cmd = "import paraview;paraview.fromGUI = True"; - pyInterp->run(cmd.c_str()); - } - for (int i = 0; i < argc; i++) free(argv[i]); delete[] argv; -- 2.30.2