Skip to content
Snippets Groups Projects
Commit 571e47d8 authored by Elliot Oram's avatar Elliot Oram
Browse files

Only ask about rebinning when shift is not used

Refs #14090
parent 5213ab2c
No related branches found
No related tags found
No related merge requests found
......@@ -94,21 +94,26 @@ void ContainerSubtraction::run() {
}
// Check for same binning across sample and container
if (!checkWorkspaceBinningMatches(sampleWs, canCloneWs)) {
QString text = "Binning on sample and container does not match."
"Would you like to rebin the sample to match the container?";
int result = QMessageBox::question(NULL, tr("Rebin sample?"), tr(text),
QMessageBox::Yes, QMessageBox::No,
QMessageBox::NoButton);
if (result == QMessageBox::Yes) {
addRebinStep(canCloneName, sampleWsName);
} else {
m_batchAlgoRunner->clearQueue();
g_log.error("Cannot apply absorption corrections using a sample and "
"container with different binning.");
return;
if (m_uiForm.ckShiftCan->isChecked()) {
addRebinStep(canCloneName, sampleWsName);
} else {
if (!checkWorkspaceBinningMatches(sampleWs, canCloneWs)) {
QString text =
"Binning on sample and container does not match."
"Would you like to rebin the sample to match the container?";
int result = QMessageBox::question(NULL, tr("Rebin sample?"), tr(text),
QMessageBox::Yes, QMessageBox::No,
QMessageBox::NoButton);
if (result == QMessageBox::Yes) {
addRebinStep(canCloneName, sampleWsName);
} else {
m_batchAlgoRunner->clearQueue();
g_log.error("Cannot apply absorption corrections using a sample and "
"container with different binning.");
return;
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment