170 std::string groupName(
"NewGroup");
172 if (selected.size() < 2) {
177 if (
m_adapter->doesWorkspaceExist(groupName)) {
178 if (!
m_view->
askUserYesNo(
"",
"Workspace " + groupName +
" already exists. Do you want to replace it?"))
183 std::string algName(
"GroupWorkspaces");
186 alg->setProperty(
"InputWorkspaces", selected);
187 alg->setPropertyValue(
"OutputWorkspace", groupName);
189 bool bStatus = alg->execute();
201 if (selected.size() == 0) {
208 auto wsname = selected[0];
210 std::string algName(
"UnGroupWorkspace");
213 alg->setProperty(
"InputWorkspace", wsname);
216 bool bStatus = alg->execute();
230 bool deleteWs =
true;
234 if (!std::all_of(selected.cbegin(), selected.cend(),
235 [=](
const std::string &ws) { return m_adapter->doesWorkspaceExist(ws); })) {
237 "Unable to delete workspaces. Invalid workspace names provided.");
306 for (
auto &ws : wsNames) {
310 alg->setPropertyValue(
"Workspace", ws);
static T & Instance()
Return a reference to the Singleton instance, creating it if it does not already exist Creation is do...
std::shared_ptr< IAlgorithm > IAlgorithm_sptr
shared pointer to Mantid::API::IAlgorithm
Helper class which provides the Collimation Length for SANS instruments.