Skip to content

Commit

Permalink
Refs #7807 Fix for failing unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Jackson committed Sep 17, 2013
1 parent e376da7 commit 7c01f0c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Code/Mantid/Framework/Kernel/inc/MantidKernel/DataService.h
Expand Up @@ -300,7 +300,8 @@ class DLLExport DataService
// if there is another object which has newName delete it
// this is actually a replace operation, so we send out there notifications as well.
it = datamap.find( newName );
if ( it != datamap.end() )
bool replace = (it != datamap.end());
if ( replace )
{
notificationCenter.postNotification(new BeforeReplaceNotification(newName, it->second, object));

Expand All @@ -319,7 +320,7 @@ class DLLExport DataService
}

//if we're replacing, send out the post replace notification
if(it != datamap.end())
if( replace )
{
notificationCenter.postNotification(new AfterReplaceNotification(newName,object));
}
Expand Down

0 comments on commit 7c01f0c

Please sign in to comment.