only show N0 estimate dialog in chisq if fittype fits.

This commit is contained in:
2017-02-06 09:19:19 +01:00
parent d13c6565ca
commit 3a112cd391
3 changed files with 29 additions and 2 deletions

View File

@@ -1700,7 +1700,8 @@ void PTextEdit::musrCalcChisq()
return;
int result = 0;
if (fAdmin->getEstimateN0Flag())
int fittype = currentEditor()->getFitType();
if (fAdmin->getEstimateN0Flag() && ((fittype==0) || (fittype==4)))
result = QMessageBox::question(this, "Estimate N0 active",
"Do you wish a chisq/mlh evaluation with an automatic N0 estimate?",
QMessageBox::Yes, QMessageBox::No);
@@ -1722,7 +1723,7 @@ void PTextEdit::musrCalcChisq()
cmd.append(str);
cmd.append(QFileInfo(*fFilenames.find( currentEditor())).fileName() );
cmd.append("--chisq-only");
if (fAdmin->getEstimateN0Flag() && (result == QMessageBox::Yes))
if (fAdmin->getEstimateN0Flag() && (result == QMessageBox::Yes) && ((fittype==0) || (fittype==4)))
cmd.append("--estimateN0");
PFitOutputHandler fitOutputHandler(QFileInfo(*fFilenames.find( currentEditor() )).absolutePath(), cmd);
fitOutputHandler.setModal(true);