Skip to content

Commit 43d94be

Browse files
Merge pull request #37828 from robertapplin/37808-isis-diagnostics-unable-to-load-file
Fix error in ISIS Diagnostics tab of Indirect Reduction
2 parents a51c7a3 + 6f4ff48 commit 43d94be

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

qt/widgets/spectroscopy/src/InelasticTab.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ std::string castToString(int value) { return boost::lexical_cast<std::string>(va
4242
template <typename Predicate>
4343
void setPropertyIf(const Algorithm_sptr &algorithm, std::string const &propName, std::string const &value,
4444
Predicate const &condition) {
45+
if (!algorithm->existsProperty(propName))
46+
return;
4547
if (condition)
4648
algorithm->setPropertyValue(propName, value);
4749
}
@@ -127,9 +129,7 @@ void InelasticTab::exportPythonScript() {
127129
*/
128130
bool InelasticTab::loadFile(const std::string &filename, const std::string &outputName, const int specMin,
129131
const int specMax, bool loadHistory) {
130-
const auto algName = loadHistory ? "Load" : "LoadNexusProcessed";
131-
132-
auto loader = AlgorithmManager::Instance().createUnmanaged(algName, -1);
132+
auto loader = AlgorithmManager::Instance().createUnmanaged("Load", -1);
133133
loader->initialize();
134134
loader->setProperty("Filename", filename);
135135
loader->setProperty("OutputWorkspace", outputName);

0 commit comments

Comments
 (0)