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

Author Committer Branch Timestamp Parent
jcfr jcfr master 2015-11-11 15:04:19 master 088b8182
Affected Issues 0002849: Hierachy not respected when loading the same scene multiples times
0003462: ModelMaker functionality breaks display of Slice views
Changeset

BUG: Workaround MRML Scene import limitation. Fixes 0003462, 0002849 and 0004080

As documented in 0004081 [1], references to other nodes are not valid
when the NodeAddedEvent is invoked during the import of a scene in
an existing scene.

This prevented the qMRMLSceneModel from working well when it is
observing the scene and updating itself as new node are added
during import.

This commit workarounds the root issue by forcing all SceneModel
to have "lazyUpdate" enabled.

When lazyUpdate is enabled, the model ignores added node events when the
scene is importing/restoring, but synchronize with the scene once its
imported/restored.

This affected a broad set of modules and was captured in the following
issues:

  • 3462: ModelMaker functionality breaks display of Slice views
  • 2849: Hierachy not respected when loading the same scene multiples times
  • 4080: Transform module is not updated properly after importing a scene

Reviewed-by: Andras Lasso <lasso@queensu.ca>
Reviewed-by: Steve Pieper <pieper@isomics.com>
Tested-by: Andras Lasso <lasso@queensu.ca>
Tested-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>

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

mod - Libs/MRML/Widgets/qMRMLSceneModel.cxx Diff File