Salome HOME
0022712: [CEA 1300] LightApp_PreferencesDlg - invalid layout / resize policy
[modules/gui.git] / src / Session / SALOME_Session_Server.cxx
index 46030c5385088981c006c25ba0a85d39d6916bf6..4d34b5e5822f4c08160cc49bb2b8ca8d13929900 100755 (executable)
@@ -259,19 +259,6 @@ public:
 
   virtual bool notify( QObject* receiver, QEvent* e )
   {
-#if OCC_VERSION_LARGE < 0x06010100
-    // Disable GUI user actions while python command is executed
-    if (SUIT_Session::IsPythonExecuted()) {
-      // Disable mouse and keyboard events
-      QEvent::Type aType = e->type();
-      if (aType == QEvent::MouseButtonPress || aType == QEvent::MouseButtonRelease ||
-          aType == QEvent::MouseButtonDblClick || aType == QEvent::MouseMove ||
-          aType == QEvent::Wheel || aType == QEvent::ContextMenu ||
-          aType == QEvent::KeyPress || aType == QEvent::KeyRelease ||
-          aType == QEvent::Accel || aType == QEvent::AccelOverride)
-        return false;
-    }
-#endif
 
 #ifdef ENABLE_TESTRECORDER
     return myHandler ? myHandler->handle( receiver, e ) :
@@ -666,9 +653,11 @@ int main( int argc, char **argv )
     init->explicit_destroy();
 
   // After ORB destruction
-  PyGILState_Ensure();
   if(Py_IsInitialized())
-    Py_Finalize();
+    {
+      PyGILState_Ensure();
+      Py_Finalize();
+    }
 
   if ( shutdownAll )
     killOmniNames();