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.
Test plan
Test 1
For each mouse mode actions (first group of actions in the Tools
menu):
- Check the action
- Check a builtin / quick annotation
- Uncheck the annotation action with either right click or Esc or clicking on the annotation action again
- 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
- Check
Trim to Selection
do not use it - Check a builtin / quick annotation
- Uncheck the annotation action with either right click or Esc or clicking on the annotation action again
- 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)