From: ribes Date: Wed, 28 Jul 2010 13:57:15 +0000 (+0000) Subject: - Two bugs: X-Git-Tag: V5_1_5a1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FBR_WIN_INDUS;p=modules%2Fjobmanager.git - Two bugs: - Buttons on wizard that sometimes disappear - State not correctly synchronized on start job --- diff --git a/src/engine/BL_JobsManager.cxx b/src/engine/BL_JobsManager.cxx index 7a56458..98b5db7 100644 --- a/src/engine/BL_JobsManager.cxx +++ b/src/engine/BL_JobsManager.cxx @@ -187,17 +187,17 @@ BL::JobsManager::starting_job_thread(void * object_ptr) // End if (result == "") { - if (object->_observer) - object->_observer->sendEvent("start_job", "Ok", job_name, ""); job->setState(BL::Job::QUEUED); job->setThreadState(BL::Job::NOTHING); + if (object->_observer) + object->_observer->sendEvent("start_job", "Ok", job_name, ""); } else { - if (object->_observer) - object->_observer->sendEvent("start_job", "Error", job_name, result); job->setState(BL::Job::ERROR); job->setThreadState(BL::Job::NOTHING); + if (object->_observer) + object->_observer->sendEvent("start_job", "Error", job_name, result); } object->_thread_mutex.unlock(); } diff --git a/src/genericgui/BL_CreateJobWizard.cxx b/src/genericgui/BL_CreateJobWizard.cxx index a5a5b34..286c6ee 100644 --- a/src/genericgui/BL_CreateJobWizard.cxx +++ b/src/genericgui/BL_CreateJobWizard.cxx @@ -379,7 +379,6 @@ BL::YACSSchemaPage::YACSSchemaPage(QWidget * parent) label->setWordWrap(true); QPushButton * yacs_file_button = new QPushButton(tr("Choose YACS Schema file")); - yacs_file_button->show(); connect(yacs_file_button, SIGNAL(clicked()), this, SLOT(choose_file())); _yacs_file_text = new QLineEdit(this); @@ -388,7 +387,6 @@ BL::YACSSchemaPage::YACSSchemaPage(QWidget * parent) _yacs_file_text->setReadOnly(true); QPushButton * command_env_file_button = new QPushButton(tr("Choose an environnement file")); - command_env_file_button->show(); connect(command_env_file_button, SIGNAL(clicked()), this, SLOT(choose_env_file())); _line_env_file = new QLineEdit(this); registerField("env_yacs_file", _line_env_file); @@ -463,14 +461,12 @@ BL::CommandMainPage::CommandMainPage(QWidget * parent) // command QPushButton * command_file_button = new QPushButton(tr("Choose a command file")); - command_file_button->show(); connect(command_file_button, SIGNAL(clicked()), this, SLOT(choose_command_file())); _line_command = new QLineEdit(this); registerField("command", _line_command); _line_command->setReadOnly(true); QPushButton * command_env_file_button = new QPushButton(tr("Choose an environnement file")); - command_env_file_button->show(); connect(command_env_file_button, SIGNAL(clicked()), this, SLOT(choose_env_file())); _line_env_file = new QLineEdit(this); registerField("env_command_file", _line_env_file); @@ -917,14 +913,12 @@ BL::PythonSalomeMainPage::PythonSalomeMainPage(QWidget * parent) // PythonSalome QPushButton * PythonSalome_file_button = new QPushButton(tr("Choose a Python file")); - PythonSalome_file_button->show(); connect(PythonSalome_file_button, SIGNAL(clicked()), this, SLOT(choose_PythonSalome_file())); _line_PythonSalome = new QLineEdit(this); registerField("PythonSalome", _line_PythonSalome); _line_PythonSalome->setReadOnly(true); QPushButton * PythonSalome_env_file_button = new QPushButton(tr("Choose an environnement file")); - PythonSalome_env_file_button->show(); connect(PythonSalome_env_file_button, SIGNAL(clicked()), this, SLOT(choose_env_file())); _line_env_file = new QLineEdit(this); registerField("env_PythonSalome_file", _line_env_file);