Import 2017-06-07 23:51:09: master 7718bca3

Author Committer Branch Timestamp Parent
naucoin naucoin master 2015-07-07 13:53:04 master 1440084b
Affected Issues 0003956: Repeated saves of MRBs cause corruption
Changeset

BUG: add missing storage nodes on scene view save

This is an optional fix, the issue is fixed without it but it
is something that I ran across while digging into the series
of bugs that needed fixing. If you open up Slicer, add a fiducial
and a downloaded sample data volume, then save a scene view, the scene view
is missing storage nodes for those nodes since they haven't been saved yet.
Then when you save the scene to disk, storage nodes are created
(usually by the save data dialog) and added to the main scene.
Now there's a mismatch between the nodes in the main scene, the scene
view saved at the save to disk moment, and the old scene view.

This change checks for storable nodes that are to go into a scene view and
adds storage nodes for them to avoid that node mismatch.

The reason it's optional is that on scene load, the storage nodes are not
triggered to read (and they currently all point to the same file name anyway).
The MRB-Scene View multiple saves and restores test passes without this, but it
makes the mrml file more clean to have matching storage nodes in all scene views.

Issue 0003956

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

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