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

Author Committer Branch Timestamp Parent
naucoin naucoin master 2014-05-19 17:51:29 master aa9009d5
Affected Issues 0001299: Facelift for Sceneviews Module
Changeset

BUG: fix crash when scene view added without screen shot

When saving a scene with the Scene Views module open, a null
pointer crash happened because the qSlicerSceneWriter was adding
the scene view node to the scene before capturing and setting
the screen shot. The mrml application logic does the same thing.
For now, avoid the crash by checking the pointer. The
thumbnail immage will appear on the next update, but since the
mrml scene isn't invoking an event when it's finished the
Commit call, the module will have to in future observe scene view
nodes for modified events to detect that a screen shot has been
added to the node (and if there have been other updates directly
to the node rather than via the GUI).

Issue 0001299

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

mod - Modules/Loadable/SceneViews/GUI/qSlicerSceneViewsModuleWidget.cxx Diff File