]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Added possibility to set the Python console synchronous by setting the environment...
authorgdd <gdd>
Mon, 17 Oct 2011 08:53:51 +0000 (08:53 +0000)
committergdd <gdd>
Mon, 17 Oct 2011 08:53:51 +0000 (08:53 +0000)
src/PyConsole/PyConsole_Console.cxx

index d8fdf13f5fcb9fc82bee451bb0cb6b20491b3728..afba1a7118d1e084651c842639469f2bb6b3629f 100644 (file)
@@ -41,6 +41,8 @@
 #include <QMenu>
 #include <QVBoxLayout>
 
+#include <utilities.h>
+
 /*!
   \brief Constructor.
 
@@ -64,6 +66,12 @@ PyConsole_Console::PyConsole_Console( QWidget* parent, PyConsole_Interp* interp
   QVBoxLayout* lay = new QVBoxLayout( this );
   lay->setMargin( 0 );
   myEditor = new PyConsole_Editor( myInterp, this );
+  char* synchronous = getenv("PYTHON_CONSOLE_SYNC");
+  if (synchronous && atoi(synchronous))
+  {
+      MESSAGE("Python console is synchronous");
+      myEditor->setIsSync(true);
+  }
   myEditor->viewport()->installEventFilter( this );
   lay->addWidget( myEditor );