Skip to content
Commit 9b826755 authored by Halla Rempt's avatar Halla Rempt
Browse files

Add basic modifier key support to selection tools

This refactors polygonal, elliptical, and rectangular selection tools to
use a basic selection tool template which unifies previously duplicated
code. The template overrides the ability to execute alternate actions, but
none of those tools supported alternate actions previously and the ellipse
and rectangle were already overriding the modifier keys to begin with.

Shift: add to selection

Alt: subtract from selection

Shift+Alt: intersect current selection

Ctrl: replace selection

Certain key combinations allow users the ability to expose the modifier
keys to the base tool, i.e. to make proportional / translated / scaled
alterations using ctrl/alt/shift.

1) If the user clicks first and then presses modifier keys, those modifier
keys will only alter the selection method.

2) If the user presses modifier keys first and then clicks, the selection
method is locked in, and subsequent modifier keystrokes will change how
the selection is drawn.

3) If the underlying tool never takes modifier keys, modifier keys will
always alter the selection method.

Note: the bezier curve selection tool doesn't support the modifiers yet.

Patch by Michael Abrahams. Thanks!
CCMAIL: miabraha@gmail.com
REVIEW: 123833
BUG: 315255
parent 3b81d7b1
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment