Import 2017-06-07 23:51:09: master b2fbe65f

Author Committer Branch Timestamp Parent
lassoan lassoan master 2015-12-23 16:37:53 master d58ba3b4
Changeset

BUG: Fixed node references for singleton nodes

Problem: When importing a scene sometimes a slice node disappears and model nodes become corrupted.

Root cause: Node ID in node references in singleton nodes (such as slice views) are not updated when a scene is imported. The imported singleton node simply overwrites the old singleton node but in case of node ID conflicts, the singleton node is not notified about ID changes. This may cause mix-up of display nodes of slice (model) nodes and regular model nodes.

Fix: Handle node ID changes in singleton nodes properly. Keep the old singleton node object, overwrite its contents with the imported node content, track any node ID changes for singleton nodes (not very common), and call SetSceneReferences for the imported singleton node (this will make the singleton node notified about relevant node ID changes).

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

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