Salome HOME
From Community Forum: Save/Load incorrectly works if there are several Python modules...
authorvsr <vsr@opencascade.com>
Mon, 15 Feb 2021 11:20:49 +0000 (14:20 +0300)
committervsr <vsr@opencascade.com>
Mon, 15 Feb 2021 11:20:49 +0000 (14:20 +0300)
src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_Module.cxx

index c1f754d19b678af22330b4bde42715c4f55ca49a..4b44353888ab88c3b17cdc9f75d47a7099c192e3 100644 (file)
@@ -112,16 +112,12 @@ SALOME_PYQT_Module::~SALOME_PYQT_Module()
 */
 QString SALOME_PYQT_Module::engineIOR() const
 {
-  // call helper to get IOR from Python module
-  static QString ior;
+  // first call helper to get IOR from Python module
+  QString ior = myHelper->engineIOR();
 
+  // if IOR is still not specified, try default implementation
+  // which loads engine to the default FactoryServer container.
   if ( ior.isEmpty() ) {
-    // first call helper to get IOR from Python module
-    ior = myHelper->engineIOR();
-  }
-  if ( ior.isEmpty() ) {
-    // if IOR is still not specified, try default implementation
-    // which loads engine to the default FactoryServer container.
     Engines::EngineComponent_var comp;
     // temporary solution
     try {