diff --git a/programs/us_experiment/us_experiment_gui_optima.cpp b/programs/us_experiment/us_experiment_gui_optima.cpp
index 5d51d977f..dbde2e9f0 100644
--- a/programs/us_experiment/us_experiment_gui_optima.cpp
+++ b/programs/us_experiment/us_experiment_gui_optima.cpp
@@ -5672,9 +5672,12 @@ DbgLv(1) << "EGAp:svAP: new DB: ID" << aprof->aprofID
// Slot to save the current Run Protocol
bool US_ExperGuiUpload::saveRunProtocol()
{
-
bool save_aborted = false;
+ if ( proto_svd )
+ return save_aborted;
+
+
if ( mainw->ScanCount_global > 1501 )
{
QMessageBox::critical( this,
@@ -6219,20 +6222,27 @@ void US_ExperGuiUpload::submitExperiment_confirm()
// End of dealing with unchanged protocol /////////////////////////////////////////////////////////////
QMessageBox msgBox;
+ QPushButton *Accept = msgBox.addButton(tr("OK"), QMessageBox::YesRole);
+ QPushButton *Cancel = msgBox.addButton(tr("Cancel"), QMessageBox::RejectRole);
+
QString message_protocol = tr( "");
- if ( rps_differ )
+ if ( rps_differ && !proto_svd )
message_protocol += tr( "A new protocol has been successfully saved to US-LIMS DB. \n\n");
QString message_submission = message_protocol + tr("Experiment will be submitted to the following Optima machine:");
//Info on assigened oper/revs: ONLY for GMP!!!!
- QStringList oper_listList = rpRotor->operListAssign.split("\n");
- QStringList rev_listList = rpRotor->revListAssign.split("\n");
-
+ QString oper_list = rpRotor->operListAssign.split("\n").join(", ");
+ QString rev_list = rpRotor->revListAssign.split("\n").join(", ");
+
+ QString o_list = oper_list. isEmpty() ? QString("MISSING") : oper_list;
+ QString r_list = rev_list. isEmpty() ? QString("MISSING") : rev_list;
+
//msgBox.setText(tr("Experiment will be submitted to the following Optima machine:"));
msgBox.setText( message_submission );
- QString info_text = QString( tr ("Name: %1
Host: %2
Port: %3 ") )
+ QString info_text = QString( tr ("Run Name: %1
Instrument: %2
Host: %3
Port: %4 ") )
+ .arg( currProto->runname )
.arg(alias)
.arg(dbhost)
.arg(dbport);
@@ -6244,24 +6254,36 @@ void US_ExperGuiUpload::submitExperiment_confirm()
" %1
"
"Assigner Reviewer(s):
"
" %2"))
- .arg(oper_listList.join(", "))
- .arg(rev_listList.join(", "));
-
+ .arg( o_list )
+ .arg( r_list );
}
-
+
+ if ( o_list.contains( "MISSING" ) || r_list. contains( "MISSING" ) )
+ {
+ info_text += QString( tr( "
ATTENTION: "
+ "Experiment can NOT be submitted due to
"
+ "missing assigned operator(s) and/or reviewer(s).
"
+ "Please return to 2. Labs/Rotor settings and provide missing information.")
+ );
+ }
+
msgBox.setInformativeText( info_text);
-
msgBox.setWindowTitle(tr("Confirm Experiment Run Submission"));
- QPushButton *Accept = msgBox.addButton(tr("OK"), QMessageBox::YesRole);
- QPushButton *Cancel = msgBox.addButton(tr("Cancel"), QMessageBox::RejectRole);
-
+
msgBox.setIcon(QMessageBox::Question);
msgBox.exec();
if (msgBox.clickedButton() == Accept)
{
- qDebug() << "Submitting...";
- submitExperiment();
+ if ( o_list == "MISSING" || r_list == "MISSING" )
+ {
+ return;
+ }
+ else
+ {
+ qDebug() << "Submitting...";
+ submitExperiment();
+ }
}
else if (msgBox.clickedButton() == Cancel)
{