diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2015-04-03 17:21:22 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2015-04-03 17:21:22 +0300 |
commit | 53a3850a8a05249942a0c4a16060e9491456af02 (patch) | |
tree | 39d46eeeba6e5570fadf0778942f2c6f56591526 /source/blender/editors/interface/interface_eyedropper.c | |
parent | b444887054297d83c560e860219a5c598d390935 (diff) |
Sticky Keys backend
Design task: T42339
Differential Revision: D840
Initial implementation proposal: T41867
Short description:
With this we can distinguish between holding and tabbing a key. Useful
is this if we want to assign to operators to a single shortcut. If two
operators are assigned to one shortcut, we call this a sticky key.
More info is accessible through the design task and the diff.
A few people that were involved with this:
* Sean Olson for stressing me with this burden ;) - It is his enthusiasm
that pushed me forward to get this done
* Campbell and Antony for the code and design review
* Ton for the design review
* All the other people that gave feedback on the patch and helped to
make this possible
A big "Thank You" for you all!
Diffstat (limited to 'source/blender/editors/interface/interface_eyedropper.c')
-rw-r--r-- | source/blender/editors/interface/interface_eyedropper.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_eyedropper.c b/source/blender/editors/interface/interface_eyedropper.c index f5847a9d701..96f9b87611f 100644 --- a/source/blender/editors/interface/interface_eyedropper.c +++ b/source/blender/editors/interface/interface_eyedropper.c @@ -277,6 +277,10 @@ static int eyedropper_modal(bContext *C, wmOperator *op, const wmEvent *event) eyedropper_cancel(C, op); return OPERATOR_CANCELLED; case LEFTMOUSE: + /* two release events are sent on KM_CLICK, so ignore second one */ + if (event->click_type == KM_CLICK) { + break; + } if (event->val == KM_RELEASE) { if (eye->accum_tot == 0) { eyedropper_color_sample(C, eye, event->x, event->y); |