Page MenuHomePhabricator

Renderer interaction hangs in PACS mode when using keyboard modifiers
Closed, ResolvedPublic

Description

When using the renderers in PACS interaction mode using keyboard modifiers (e.g. control + button to zoom), the renderer may become unresponsive when the modifier key is released too early.

To reproduce:

  • Load an image file;
  • Press and hold the control key;
  • Press and drag the right mouse button over a renderer window (do not release yet);
  • Release the control key;
  • Release the right mouse button.

The renderers now do not initiate any mouse interaction when clicking/dragging.

To 'unfreeze':

  • Press and hold the control key;
  • Press and hold the right mouse button over a renderer window;
  • Release the right mouse button;
  • Release the control key.

All interactivity is now as it should be.

Reproduced on Windows (release 2021 and 2018) and macOS.

Revisions and Commits

rMITK MITK
Restricted Differential Revision
Restricted Differential Revision

Event Timeline

The cause for this problem lies in missing state-transitions of the interaction state-machine. DisplayConfigPACS.xml defines the events based on which the state-machine in DisplayInteraction.xml acts. For modifier-based interactions, a MousePressEvent / MouseReleaseEvent in combination with a modifier-key are responsible to transition into / out of the corresponding state ("move", "zoom", ...). When the modifier-key is released BEFORE releasing the mouse button, the second event is never triggered, causing the state machine to get stuck in that specific state, which blocks most other interactions.

There are two options I can think of right now:

  1. Add new events for these specific interactions (i.e. "KeyReleaseEvent" in combination with a pressed Mouse Button) to catch both cases, first releasing the mouse button or first releasing the modifier key. This is somewhat complicated, as nothing in the direction of a "KeyReleaseEvent" is currently available and would need to be introduced by expanding how interaction of key events is handled.
  2. Introduce a "catch all" event that resets any state back to default, e.g. by using a MouseMoveEvent with no additional keys pressed.
s434n added a revision: Restricted Differential Revision.Aug 3 2021, 10:34 AM