X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPV_SWIG%2Fpvsimple.py;h=219cc503b936de3cfcc665a67e0ba23c2306605c;hb=4095225705684389c98367e7ba154be482dfd468;hp=b5f95d9f5220b6177234e83f5d65eca6870bcafe;hpb=0f47b7b716e2685caab9c1756d84937f6af36703;p=modules%2Fparavis.git diff --git a/src/PV_SWIG/pvsimple.py b/src/PV_SWIG/pvsimple.py index b5f95d9f..219cc503 100644 --- a/src/PV_SWIG/pvsimple.py +++ b/src/PV_SWIG/pvsimple.py @@ -1,4 +1,4 @@ -# Copyright (C) 2010-2015 CEA/DEN, EDF R&D +# Copyright (C) 2010-2016 CEA/DEN, EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -47,8 +47,8 @@ def __getFromGUI(): def ShowParaviewView(): """ - If the import is made from SALOME embedded console, the ParaView application needs to - be instanciated to avoid a future crash. + If the import is made from SALOME embedded console, the ParaView application needs to + be instanciated to avoid a future crash. """ if __getFromGUI(): __my_log("Initializing ParaView main elements, please be patient ...") @@ -58,14 +58,14 @@ def ShowParaviewView(): if len(viewIds): sgPyQt.setViewVisible(viewIds[0], True) sgPyQt.activateView(viewIds[0]) - else: + else: sgPyQt.createView("ParaView") # Now let the GUI main loop process the initialization event posted above - sgPyQt.processEvents() + sgPyQt.processEvents() __my_log("ParaView initialized.") ## The below has to called BEFORE importing paraview!!! This is crazy, but it has to be. -ShowParaviewView() +ShowParaviewView() import paraview import pvserver @@ -97,7 +97,7 @@ def SalomeConnectToPVServer(): __my_log("*******************************************") raise e pass - + if __getFromGUI() < 1: # Only if not in GUI (otherwise the createView will do the connection) SalomeConnectToPVServer() @@ -108,4 +108,3 @@ for name in dir(simple): if not name.startswith("__"): globals()[name] = getattr(simple, name) del simple -