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

Author Committer Branch Timestamp Parent
lassoan lassoan master 2015-03-08 13:18:12 master d3c834e9
Changeset

BUG: Fixed markup custom modification event notifications

Fixes http://www.na-mic.org/Bug/view.php?id=3961 (markups RemoveAllItems not working properly) and many other update issues.

Problem:
StartModify/EndModify mechanism works well for Modified() event compression. Such mechanism is desirable for custom, more specific modified events, too (such as when markups are added, removed, modified).
For example, the same mechanism was implemented for TransformModified and for MarkupAddedEvent, MarkupRemovedEvent, etc.

Solution:
To reduce code duplication and the chance of making mistakes (e.g., Markup modification event compression was implemented incorrectly), the mechanism is now available for custom modified events.
Usage is very simple instead of calling vtkMRMLNode::InvokeEvent on has to call vtkMRMLNode::InvokeCustomModifiedEvent. InvokeCustomModifiedEvent behaves the same way as InvokeEvent by default,
but if DisableModifiedEvent is enabled then InvokeCustomModifiedEvent only emits the event when EndModify is called (after invoking the pending standard Modified event).

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

mod - Libs/MRML/Core/vtkMRMLLinearTransformNode.cxx Diff File
mod - Libs/MRML/Core/vtkMRMLNode.h Diff File
mod - Libs/MRML/Core/vtkMRMLTransformNode.cxx Diff File
mod - Libs/MRML/Core/vtkMRMLTransformNode.h Diff File
mod - Libs/MRML/Core/vtkMRMLTransformableNode.cxx Diff File
mod - Libs/MRML/Core/vtkMRMLTransformableNode.h Diff File
mod - Modules/Loadable/Markups/MRML/vtkMRMLMarkupsNode.cxx Diff File