ENH: Simplify logic in vtkMRMLViewInteractorStyle::CustomProcessEvents
#7495
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Considering that:
... we remove the check of the interaction state.
For reference,this logic was initially introduced in 364ff7b (
ENH: Use common interactor style for slice and 3D views
). At the time of that commit1, the functionDelegateInteractionEventToDisplayableManagers
was invoked once at the beginning ofCustomProcessEvents
for each events only if "state" was not VTKIS_NONE. It was also systematically invoked in the overriddenOnXXX()
functions, called as a side effect ofSuperclass::ProcessEvents
.Following the refactoring introduced in commit 1cc3b2c (
ENH: Improve Event Delegation in qMRMLThreeDView and qMRMLSliceView
), the functionDelegateInteractionEventToDisplayableManagers
now ends up being called only once for all observed events and then the "original" interactor style function are called fromvtkMRMLViewInteractorStyle::ProcessEvents()
.Footnotes
https://github.com/Slicer/Slicer/blob/364ff7b6d4758629b8659712fdec990d8bddd81b/Libs/MRML/DisplayableManager/vtkMRMLViewInteractorStyle.cxx#L351-L360 ↩