Skip to content

Commit

Permalink
Refs #8547. Check group membership by name, not pointer.
Browse files Browse the repository at this point in the history
Otherwise we end up with multiple workspaces with the same name in the
group.
  • Loading branch information
arturbekasov committed Feb 27, 2014
1 parent 1e0b2c3 commit 10ab90f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Code/Mantid/MantidQt/CustomInterfaces/src/MuonAnalysis.cpp
Expand Up @@ -368,18 +368,18 @@ void MuonAnalysis::plotItem(ItemType itemType, int tableRow, PlotType plotType)
MatrixWorkspace_sptr ws = createAnalysisWorkspace(itemType, tableRow, plotType);
MatrixWorkspace_sptr wsRaw = createAnalysisWorkspace(itemType, tableRow, plotType, true);

// Find names for new workspaces
const std::string wsName = getNewAnalysisWSName(m_currentGroup->getName(), itemType, tableRow,
plotType);
const std::string wsRawName = wsName + "_Raw";

// Make sure they are in the current group
if ( ! m_currentGroup->contains(ws) )
if ( ! m_currentGroup->contains(wsName) )
{
m_currentGroup->addWorkspace(ws);
m_currentGroup->addWorkspace(wsRaw);
}

// Find names for new workspaces
const std::string wsName = getNewAnalysisWSName(m_currentGroup->getName(), itemType, tableRow,
plotType);
const std::string wsRawName = wsName + "_Raw";

// Make sure they end up in the ADS
ads.addOrReplace(wsName, ws);
ads.addOrReplace(wsRawName, wsRaw);
Expand Down

0 comments on commit 10ab90f

Please sign in to comment.