Slicer: 2145-support-for-installing-extension-from-file b985899f

Author Committer Branch Timestamp Parent
jcfr jcfr 2145-support-for-installing-extension-from-file 2013-09-03 14:29:44 2145-support-for-installing-extension-from-file c73e9b50
Affected Issues 0002989: Loading the same color table node twice crashes Slicer.
Changeset

BUG: Fix crash preventing the same color file to be loaded more than once

As the documentation associated "AddNode" method explains, in the case
of singleton node, the return node should be considered instead of the
one passed to the method.

AddNode documentation:

/// [...]
/// If node is a singleton, and a node of the same class with the
/// same singleton tag already exists in the scene, \a nodeToAdd is NOT
/// added but its properties are copied (c.f. vtkMRMLNode::CopyWithScene())
/// into the already existing singleton node. That node is then returned.

Fixes 0002989

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22394 3bd1e089-480b-0410-8dfb-8563597acbee

mod - Libs/MRML/Logic/vtkMRMLColorLogic.cxx Diff File