Salome HOME
IPAL52550: TC7.5.0: Cursor is in waiting mode after "Update Study"
authorvsr <vsr@opencascade.com>
Fri, 24 Oct 2014 14:00:15 +0000 (18:00 +0400)
committervsr <vsr@opencascade.com>
Fri, 24 Oct 2014 14:00:15 +0000 (18:00 +0400)
src/PyConsole/PyConsole_Editor.cxx

index 66aaf5b9b72b12f3e4cf30ad04dbc512a2cfa989..42ea63e4f6c5f6b07fe9c986f011fc07d6347c89 100644 (file)
@@ -396,14 +396,21 @@ void PyConsole_Editor::execAndWait( const QString& command )
     return;
 
   // create new event loop
-  myEventLoop = new QEventLoop( this );
+  bool sync = isSync();
+  if ( !sync ) {
+    myEventLoop = new QEventLoop( this );
+  }
+
   // execute command
   exec( command );
-  // run event loop
-  myEventLoop->exec();
-  // delete event loop after command is processed
-  delete myEventLoop;
-  myEventLoop = 0;
+
+  if ( !sync ) {
+    // run event loop
+    myEventLoop->exec();
+    // delete event loop after command is processed
+    delete myEventLoop;
+    myEventLoop = 0;
+  }
 }
 
 /*!