Import 2017-06-07 23:51:09: master 0bd41093

Author Committer Branch Timestamp Parent
lassoan lassoan master 2017-04-24 21:28:46 master b3b4cc13
Changeset

BUG: Fixed referenced node observations

Observers were not added for referenced nodes when the referring node was added to the scene after the node reference was specified.

Root cause: The problem was that when an individual node was added by scene->AddNode(), no node->UpdateNodeReferences was called, which was an issue
because node->UpdateNodeReferences converts referenced node ID to a node pointer and adds event observations.

Solution: Fixed by calling node->UpdateNodeReferences when not importing (importing is a special case: node IDs may change during import and
therefore conversion of node IDs to pointers must wait until the end of import).

Testing: Updated vtkMRMLTransformableNodeOnNodeReferenceAddTest to test node references defined both before and after adding the referring
node to the scene.

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

mod - Libs/MRML/Core/Testing/vtkMRMLTransformableNodeOnNodeReferenceAddTest.cxx Diff File
mod - Libs/MRML/Core/vtkMRMLScene.cxx Diff File