diff --git a/Code/Mantid/Framework/Algorithms/src/Stitch1DMany.cpp b/Code/Mantid/Framework/Algorithms/src/Stitch1DMany.cpp index 6f63f26bff51d45929ce599e7a73e14ccf3349b4..8611b757ee9372acc8d756c7727534fc5312364a 100644 --- a/Code/Mantid/Framework/Algorithms/src/Stitch1DMany.cpp +++ b/Code/Mantid/Framework/Algorithms/src/Stitch1DMany.cpp @@ -207,18 +207,20 @@ void Stitch1DMany::exec() { // List of workspaces to be grouped std::vector<std::string> toGroup; + const std::string groupName = this->getProperty("OutputWorkspace"); + size_t numWSPerGroup = groupWorkspaces[0]->size(); for (size_t i = 0; i < numWSPerGroup; ++i) { // List of workspaces to stitch std::vector<std::string> toProcess; // The name of the resulting workspace - std::string outName; + std::string outName = groupName; for (size_t j = 0; j < groupWorkspaces.size(); ++j) { const std::string wsName = groupWorkspaces[j]->getItem(i)->name(); toProcess.push_back(wsName); - outName += wsName; + outName += "_" + wsName; } IAlgorithm_sptr stitchAlg = createChildAlgorithm("Stitch1DMany"); @@ -245,8 +247,6 @@ void Stitch1DMany::exec() { scaleFactors.end()); } - const std::string groupName = this->getProperty("OutputWorkspace"); - IAlgorithm_sptr groupAlg = createChildAlgorithm("GroupWorkspaces"); groupAlg->initialize(); groupAlg->setAlwaysStoreInADS(true);