Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions qt/widgets/spectroscopy/src/InelasticTab.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ std::string castToString(int value) { return boost::lexical_cast<std::string>(va
template <typename Predicate>
void setPropertyIf(const Algorithm_sptr &algorithm, std::string const &propName, std::string const &value,
Predicate const &condition) {
if (!algorithm->existsProperty(propName))
return;
if (condition)
algorithm->setPropertyValue(propName, value);
}
Expand Down Expand Up @@ -127,9 +129,7 @@ void InelasticTab::exportPythonScript() {
*/
bool InelasticTab::loadFile(const std::string &filename, const std::string &outputName, const int specMin,
const int specMax, bool loadHistory) {
const auto algName = loadHistory ? "Load" : "LoadNexusProcessed";

auto loader = AlgorithmManager::Instance().createUnmanaged(algName, -1);
auto loader = AlgorithmManager::Instance().createUnmanaged("Load", -1);
loader->initialize();
loader->setProperty("Filename", filename);
loader->setProperty("OutputWorkspace", outputName);
Expand Down