Skip to content

Uncheck mouse mode action when annotation tool selected

When the annotation is unchecked the previous mouse mode is restored.

The slot slotMouseNormalToggled is changed back to its original version of slotSetMouseNormal given that we needed to pass the checked state only to detach the annotations, and we do it in the lambda now.

BUG: 398108

BUG: 437377

Test plan

Test 1

For each mouse mode actions (first group of actions in the Tools menu):

  1. Check the action
  2. Check a builtin / quick annotation
  3. Uncheck the annotation action with either right click or Esc or clicking on the annotation action again
  4. The previous mouse mode action is checked and we are actually in that mouse mode

Test 2

This behavior should not be affected by the current MR, but just to be sure I checked

  1. Check Trim to Selection do not use it
  2. Check a builtin / quick annotation
  3. Uncheck the annotation action with either right click or Esc or clicking on the annotation action again
  4. The trim to selection mode is restored and we can complete the trim selection (a bit weird, it would be better to cancel the trim operation. Maybe this can be improved in another MR)

Merge request reports