From 436012d943fd4b6439c6e40698c14e1d56cb64f0 Mon Sep 17 00:00:00 2001 From: smh Date: Thu, 6 May 2004 07:36:47 +0000 Subject: [PATCH] SMH: KERNEL5826 - frozen python console --- src/SALOMEGUI/QAD_PyEditor.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/SALOMEGUI/QAD_PyEditor.cxx b/src/SALOMEGUI/QAD_PyEditor.cxx index e7c52baca..4aa41e589 100644 --- a/src/SALOMEGUI/QAD_PyEditor.cxx +++ b/src/SALOMEGUI/QAD_PyEditor.cxx @@ -50,7 +50,7 @@ using namespace std; #ifdef _DEBUG_ -static int MYDEBUG = 1; +static int MYDEBUG = 0; #else static int MYDEBUG = 0; #endif @@ -123,22 +123,23 @@ public: protected: virtual void run(){ + QThread::postEvent(myListener, new QCustomEvent(QAD_PyEditor::SET_WAIT_CURSOR)); + int anId = QAD_PyEditor::PYTHON_OK; if(myCommand != ""){ ThreadLock anEditorLock(myMutex,"TExecCommandThread::anEditorLock"); //ThreadLock aStudyLock(myStudyMutex,"TExecCommandThread::aStudyLock"); ThreadLock aPyLock = GetPyThreadLock("TExecCommandThread::aPyLock"); int ret = myInterp->run( myCommand.latin1() ); if(MYDEBUG) MESSAGE("TExecCommand::run() - myInterp = "< 0) anId = QAD_PyEditor::PYTHON_INCOMPLETE; myListener->myError = myInterp->getverr().c_str(); myListener->myOutput = myInterp->getvout().c_str(); - QThread::postEvent(myListener, new QCustomEvent(anId)); - QThread::postEvent(myListener, new QCustomEvent(QAD_PyEditor::UNSET_CURSOR)); } + QThread::postEvent(myListener, new QCustomEvent(anId)); + QThread::postEvent(myListener, new QCustomEvent(QAD_PyEditor::UNSET_CURSOR)); } private: -- 2.39.2