Commit 9602d396 authored by allens's avatar allens

added confirm when terminating or aborting

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@27787 18c085ea-50e0-402c-830e-de6fd14e8384
parent 96a67dc7
......@@ -1858,6 +1858,33 @@ QvisSimulationWindow::executePushButtonCommand(const QString &btncmd)
string host = engines->GetEngineName()[index];
string sim = engines->GetSimulationName()[index];
if( btncmd == QString("Abort") ||
btncmd == QString("abort") ||
btncmd == QString("Terminate") ||
btncmd == QString("terminate") )
{
// Create a prompt for the user.
QString msg;
if (sim == "")
{
msg = tr("Really %1 the simulation on host \"%2\"?\n\n")
.arg(btncmd)
.arg(host.c_str());
}
else
{
msg = tr("Really %1 the simulation \"%2\" on host \"%3\"?\n\n")
.arg(btncmd)
.arg(sim.c_str())
.arg(host.c_str());
}
// Ask the user if they really want to execute this command.
if (QMessageBox::warning(this, "VisIt", msg, QMessageBox::Ok | QMessageBox::Cancel)
== QMessageBox::Cancel)
return;
}
QString cmd(btncmd);
QString args(QString("clicked();%1;QPushButton;Simulations;NONE").arg(cmd));
GetViewerMethods()->SendSimulationCommand(host, sim, btncmd.toStdString(), args.toStdString());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment