Skip to content

Commit

Permalink
Refs #8913 Fix bug(s) with copying algorithm history objects.
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Jackson committed Apr 28, 2014
1 parent d8481c4 commit 57d00a0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Code/Mantid/Framework/API/src/AlgorithmHistory.cpp
Expand Up @@ -88,6 +88,12 @@ void AlgorithmHistory::addExecutionInfo(const DateAndTime& start, const double&
*/
void AlgorithmHistory::addChildHistory(const AlgorithmHistory& childHist)
{
// Don't copy one's own history onto oneself
if (this == &childHist)
{
return;
}

m_childHistories.insert(childHist);
}

Expand Down Expand Up @@ -168,6 +174,7 @@ AlgorithmHistory& AlgorithmHistory::operator=(const AlgorithmHistory& A)
m_executionDate=A.m_executionDate;
m_executionDuration=A.m_executionDuration;
m_properties=A.m_properties;
m_childHistories=A.m_childHistories;
}
return *this;
}
Expand Down

0 comments on commit 57d00a0

Please sign in to comment.