Skip to content

Fix highlighting of Mirror View as a toolbar item

R. B. requested to merge tomtomtom/krita:tomtomtom/mirrorviewhighlight into master

Often after I export an image, I only then realize I worked on the piece a majority of the time in mirrored mode. My configuration solution to this, without having to use the overview docker, was to add Mirror View to one of my toolbars, so I can tell that my canvas is in Mirror mode at a glance by looking at the toolbar item's highlight.

However, currently the action doesn't highlight properly as a toolbar item. It first necessitates the user to click on the toolbar item within the current session, or else it will never receive the blue highlight when using a keyboard shortcut.

This issue seems to stem from c23505c1 . I'm not sure why that piece of code was moved within that particular check, but moving it out of the mouse event check seems to fix the problem.

Note that this doesn't affect the action in the overview docker.

No strings changed, so it should be backportable.

Test Plan

Add Mirror View as a toolbar item. Check that it properly highlights when using a shortcut without clicking on it.

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
  • I made sure my commits build individually and have good descriptions as per KDE guidelines.
  • I made sure my code conforms to the standards set in the HACKING file.
  • I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.
Edited by R. B.

Merge request reports