Skip to content

Add compatibility between the FreeHand Selection Tool and Select Layer Action.

Firstname Aqaao requested to merge aqaao/krita:dev into master

When selecting in FreeHand Selection Tool, pressing Ctrl key will switch to straight-line mode. This shortcut key cannot change and will cause conflict if bind Select-Layer-Action(canvas input) to "Ctrl". I think what bind such temporary action to “Ctrl” is very sound (by the way, I binded sample-color-action to "ALT"). So I made this patch, Select-Layer-Action will be disabled when selecting with FreeHand Selection Tool, I don't think anyone want to change layer when painting selection region.

Here’s gif preview. 修改前 修改后

Test Plan

Open Configure window, enter Canvas Input Settings, open Select Layer menu, Bind Select-Top-Layer-Action(Replace) shortcut to "Ctrl" + "Left Button", Click Ok. Toggle tool to FreeHand Seletion Tool. While making a selection region, press "Ctrl" key, Select-Layer-Action will not be activated. If not in making selection region, Select-Layer-Action will be normal activate.

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.

Merge request reports