only show N0 estimate dialog in chisq if fittype fits.

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

View File

@ -1727,7 +1727,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?");
@ -1748,7 +1749,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);