Skip to content

add missing options to selection context menu

When right clicking the canvas while having a selection tool selected a context menu would appear showing selection actions. Before this MR the right click menu would have missing options compared to the menu bar selection menu. The following actions will now appear in the right click context menu (if the action is enabled):

  1. invert selection
  2. convert to shape
  3. reselect

I did not add every missing option to avoid making the right click menu too cluttered. I added the actions requested from Krita artists in this thread and this thread

I also reorganized the first few selection actions to mirror the ordering in the menubar selection menu for consistency.

After some discussion below the convert shapes to vector selection was also added to the select shapes tool right click context menu. This was suggested by @thetwo because this action can be enabled by using the select shapes tool but not by the other selection tools since it requires selecting a vector.

Test Plan

  1. Use a selection tool and make a selection
  2. right click on your selection and check for the added selection options

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 reinold rojas

Merge request reports