Skip to content

Commit

Permalink
re #7040 remove irritating warning
Browse files Browse the repository at this point in the history
  • Loading branch information
NickDraper committed May 14, 2013
1 parent 4bdee2c commit 0477bd9
Showing 1 changed file with 5 additions and 17 deletions.
22 changes: 5 additions & 17 deletions Code/Mantid/MantidPlot/src/muParserScript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ muParserScript::muParserScript(ScriptingEnv *env, const QString &name, QObject
: Script(env,name, Script::NonInteractive, context),
d_warn_multiline_code(checkMultilineCode)
{
// warning for multiline code removed, therefore the variable d_warn_multiline_code is not used
// however it has been left in, to remove the need to affect the class hierarchy.
variables.setAutoDelete(true);
rvariables.setAutoDelete(true);

Expand All @@ -71,23 +73,9 @@ muParserScript::muParserScript(ScriptingEnv *env, const QString &name, QObject
parser.DefineFun("cell", mu_cell);

rparser = parser;
if (context->isA("Table") || context->isA("Matrix")){
if (d_warn_multiline_code){
QApplication::restoreOverrideCursor();
QString mess = tr("Multiline expressions take much more time to evaluate! Do you want to continue anyways?");
if (QMessageBox::Yes == QMessageBox::warning((QWidget*)context, tr("MantidPlot") + " - " + tr("Warning"), mess,
QMessageBox::Yes, QMessageBox::Cancel)){
parser.SetVarFactory(mu_addVariable);
rparser.SetVarFactory(mu_addVariableR);
}
} else {
parser.SetVarFactory(mu_addVariable);
rparser.SetVarFactory(mu_addVariableR);
}
} else {
parser.SetVarFactory(mu_addVariable);
rparser.SetVarFactory(mu_addVariableR);
}
parser.SetVarFactory(mu_addVariable);
rparser.SetVarFactory(mu_addVariableR);

}

double muParserScript::col(const QString &arg)
Expand Down

0 comments on commit 0477bd9

Please sign in to comment.