]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Issue 0020165: fix crash on new study creation when single Python module is in the...
authorvsr <vsr@opencascade.com>
Fri, 27 Feb 2009 16:33:56 +0000 (16:33 +0000)
committervsr <vsr@opencascade.com>
Fri, 27 Feb 2009 16:33:56 +0000 (16:33 +0000)
src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_PyInterp.cxx
src/SALOME_PYQT/SALOME_PYQT_GUI/SALOME_PYQT_PyInterp.h
src/SalomeApp/SalomeApp_PyInterp.cxx

index 15d1528602032486716b384c6f5af5e874403716..5d2228cd1e9046fd030910c2f3830cb98c449ba5 100644 (file)
@@ -39,6 +39,19 @@ SALOME_PYQT_PyInterp::~SALOME_PYQT_PyInterp()
 {
 }
 
+void SALOME_PYQT_PyInterp::initPython()
+{
+ /*
+  * Do nothing
+  * The initialization has been done in main
+  */
+  MESSAGE("SALOME_PYQT_PyInterp::initPython");
+  ASSERT(KERNEL_PYTHON::_gtstate); // initialisation in main
+  SCRUTE(KERNEL_PYTHON::_gtstate);
+  _gtstate=KERNEL_PYTHON::_gtstate;
+  _interp=KERNEL_PYTHON::_interp;
+}
+
 bool SALOME_PYQT_PyInterp::initState()
 {
  /*
index 3daf666641046de3003667b58f068c37134bc73c..a53ee72641451f9030225493a6e92b124352b232 100644 (file)
@@ -38,6 +38,7 @@ public:
   int run( const char* );
   
 protected:
+  virtual void initPython();
   virtual bool initState();
   virtual bool initContext();  
 };
index b60117d08be838c219bbb532c971a7543766a19d..27d520f6f1fcfa0cd4a7dfc1ac19b7cf1808a831 100755 (executable)
@@ -110,7 +110,7 @@ bool SalomeApp_PyInterp::initContext()
  */
 void SalomeApp_PyInterp::initPython()
 {
-  MESSAGE("PyInterp_base::initPython");
+  MESSAGE("SalomeApp_PyInterp::initPython");
   ASSERT(KERNEL_PYTHON::_gtstate); // initialisation in main
   SCRUTE(KERNEL_PYTHON::_gtstate);
   _gtstate=KERNEL_PYTHON::_gtstate;