LeftButtonClickEvent on Markups behavior

In Slicer 4.11 nightly, the LeftButtonClickEvent on a markup fiducial results in the “Centered” Jump Slices behavior in the other slice viewers. This jumps the offsets and centers the fiducial in the center of all the other slice viewers.

In Slicer 4.10 this behavior didn’t exist, but I’m looking to keep similar behavior in Slicer 4.11 in certain situations where I want to easily allow left-click-and-drag events, but I don’t want to accidentally allow left-click events which then jumps slices.

@lassoan (markups developer) Would it make more sense for “Click to Jump Slices” in the Markups Module to become an application setting? The “Click to Jump Slices” behavior is currently specific to selecting rows in the table of the Markups module and a qSlicerSimpleMarkupsWidget has its own unique JumpToSliceEnabled attribute.

Or is there a way to simply block the LeftButtonClickEvent on markups from being processed?


Source Code

this->SetEventTranslation(WidgetStateOnWidget, vtkMRMLInteractionEventData::LeftButtonClickEvent, vtkEvent::NoModifier, WidgetEventJumpCursor);
source

The event ends up calling this code to jump slices and center:

If anyone has opinions or other inputs to make Jump Slices behavior more consistent between slice viewer behavior and other widgets that would be great! Thanks

Yes, absolutely, that’s the plan. Currently, mapping of GUI events to widget events is implemented in the widget’s constructor, but it is designed so that settings can be stored in a simple series of IDs (interaction event ID, modifiers, widget event ID). It would be great if you could work on overriding mapping from application settings.