Skip to content

Commit

Permalink
Merge pull request #22133 from mantidproject/MuonLoadCrash
Browse files Browse the repository at this point in the history
Muon analysis crashes when loading without data archive
  • Loading branch information
NickDraper authored Mar 16, 2018
2 parents f3cfaa3 + ba8bd45 commit 64d0870
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions qt/widgets/common/src/MuonFitPropertyBrowser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
#include <QSignalMapper>
#include <QTableWidgetItem>
#include <QCheckBox>
#include <QMessageBox>

namespace {
Mantid::Kernel::Logger g_log("MuonFitPropertyBrowser");
Expand Down Expand Up @@ -1549,6 +1550,12 @@ void MuonFitPropertyBrowser::updatePeriods() {
void MuonFitPropertyBrowser::updatePeriods(const int j) {
// this is for switching but has a bug at the moment
// const QStringList &selected) {
if (m_periodsToFitOptions.size() == 0) {
QMessageBox::warning(this, "Muon Analysis",
"Data not found. Please turn on the data archive, "
"using the Manage Directories button.");
return;
}
m_enumManager->setEnumNames(m_periodsToFit, m_periodsToFitOptions);
m_enumManager->setValue(m_periodsToFit, j);
if (m_periodsToFitOptions[j] == CUSTOM_LABEL) {
Expand Down

0 comments on commit 64d0870

Please sign in to comment.