Salome HOME
Fixed linking issue. Removed "paraview.fromGUI" flag.
authorabn <adrien.bruneton@cea.fr>
Tue, 30 Sep 2014 14:01:09 +0000 (16:01 +0200)
committerabn <adrien.bruneton@cea.fr>
Tue, 30 Sep 2014 14:01:09 +0000 (16:01 +0200)
src/LightApp/CMakeLists.txt
src/PVViewer/CMakeLists.txt
src/PVViewer/PVViewer_ViewManager.cxx

index ea154893ac7dcda1fb0cb15d495299b4bf9a47be..c6fe94f9bee6f55d57341eb8a3280f061479131d 100755 (executable)
@@ -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()
index c6f341e28a8d767634c3cef95dd77f3a95ef62d9..a34abb3cb409e730aa681545747734dd46a46122 100644 (file)
@@ -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}
 )
 
index a0c819edd38fcbbcd182b24d70546e81f1984e2c..31e5ab6342bf2fb51ce6e81fa697a785fe8e265d 100644 (file)
@@ -29,6 +29,7 @@
 #include <SUIT_MessageBox.h>
 #include <SUIT_Desktop.h>
 #include <SUIT_Session.h>
+#include <SUIT_Study.h>
 #include <SUIT_ResourceMgr.h>
 #include <PyInterp_Interp.h>
 #include <PyConsole_Interp.h>
@@ -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;