Skip to content

Commit

Permalink
Don't unroll groups if property is WorkspaceProperty<WorkspaceGroup>
Browse files Browse the repository at this point in the history
as this type indicates that the request is for the input to be the
whole group. Refs #6603
  • Loading branch information
martyngigg committed Mar 15, 2013
1 parent a58d83d commit 9b7998e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Code/Mantid/Framework/API/src/Algorithm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -996,6 +996,9 @@ namespace Mantid
* - In this case, algorithms are processed in order
* - OR, only one input should be a group, the others being size of 1
*
* If the property itself is a WorkspaceProperty<WorkspaceGroup> then
* this returns false
*
* Returns true if processGroups() should be called.
* It also sets up some other members.
*
Expand All @@ -1016,7 +1019,8 @@ namespace Mantid
m_groupWorkspaces.clear();
for (size_t i=0; i<m_inputWorkspaceProps.size(); i++)
{
Property * prop = dynamic_cast<Property *>(m_inputWorkspaceProps[i]);
auto * prop = dynamic_cast<Property *>(m_inputWorkspaceProps[i]);
auto * wsGroupProp = dynamic_cast<WorkspaceProperty<WorkspaceGroup> *>(prop);
std::vector<Workspace_sptr> thisGroup;

Workspace_sptr ws = m_inputWorkspaceProps[i]->getWorkspace();
Expand All @@ -1035,7 +1039,8 @@ namespace Mantid
}

// Found the group either directly or by name?
if (wsGroup)
// If the property is of type WorkspaceGroup then don't unroll
if (wsGroup && !wsGroupProp)
{
numGroups++;
processGroups = true;
Expand Down

0 comments on commit 9b7998e

Please sign in to comment.