Skip to content

Commit

Permalink
Save/load code for the Dead Time filename.
Browse files Browse the repository at this point in the history
Refs #6691
  • Loading branch information
arturbekasov committed Sep 23, 2013
1 parent 8e68564 commit e747eac
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Code/Mantid/MantidQt/CustomInterfaces/src/MuonAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1159,6 +1159,11 @@ void MuonAnalysis::inputFileChanged(const QStringList& files)
QString deadTimeFile(m_uiForm.mwRunDeadTimeFile->getFirstFilename() );

getDeadTimeFromFile(deadTimeFile);

// Remember the filename for the next time interface is opened
QSettings group;
group.beginGroup(m_settingsGroup + "DeadTimeOptions");
group.setValue("deadTimeFile", deadTimeFile);
}
}
catch(std::exception& e)
Expand Down Expand Up @@ -3335,6 +3340,10 @@ void MuonAnalysis::loadAutoSavedValues(const QString& group)

int deadTimeTypeIndex = deadTimeOptions.value("deadTimes", 0).toInt();
m_uiForm.deadTimeType->setCurrentIndex(deadTimeTypeIndex);

QString savedDeadTimeFile = deadTimeOptions.value("deadTimeFile").toString();
m_uiForm.mwRunDeadTimeFile->setUserInput(savedDeadTimeFile);

if (deadTimeTypeIndex != 2)
m_uiForm.mwRunDeadTimeFile->setVisible(false);
}
Expand Down

0 comments on commit e747eac

Please sign in to comment.