Skip to content

Commit

Permalink
Refs #6792 Checking WorkspaceGroup is not empty
Browse files Browse the repository at this point in the history
  • Loading branch information
jmborr committed Mar 28, 2013
1 parent 52fba18 commit cf5f499
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions Code/Mantid/Framework/DataHandling/src/LoadSassena.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,17 @@ void LoadSassena::init()
*/
void LoadSassena::exec()
{
API::WorkspaceGroup_sptr gws(new API::WorkspaceGroup);
API::WorkspaceGroup_sptr gws=getProperty("OutputWorkspace");
if(gws)
{
gws->deepRemoveAll(); // remove workspace members
}
else
{
gws = boost::make_shared<API::WorkspaceGroup>();
setProperty("OutputWorkspace", gws);
}
gws->observeADSNotifications( false ); // Prevent sending unnecessary notifications
setProperty("OutputWorkspace", gws); // Register the groupWorkspace in the analysis data service

//populate m_validSets
int nvalidSets = 4;
Expand Down

0 comments on commit cf5f499

Please sign in to comment.