Skip to content

Commit

Permalink
Refs #5074: fix for shared parameter maps when copying a workspace
Browse files Browse the repository at this point in the history
affected MedianDetectorTest in SOME cases
  • Loading branch information
Janik Zikovsky committed May 3, 2012
1 parent 2569369 commit 36e0dfd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Code/Mantid/Framework/API/src/WorkspaceFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ void WorkspaceFactoryImpl::initializeFromParent(const MatrixWorkspace_const_sptr
{
child->setTitle(parent->getTitle());
child->setComment(parent->getComment());
child->setInstrument(parent->getInstrument()); // This call also copies the parameter map
child->setInstrument(parent->getInstrument()); // This call also copies the SHARED POINTER to the parameter map
// This call will (should) perform a COPY of the parameter map.
child->instrumentParameters();
// TODO: Deprecate this
child->m_spectraMap = parent->m_spectraMap;
child->m_sample = parent->m_sample;
Expand Down

0 comments on commit 36e0dfd

Please sign in to comment.