diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2016-03-25 14:21:54 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2016-03-25 14:31:46 +0300 |
commit | 4509559c1318fb60e62dd8b9e6b702b44b398e20 (patch) | |
tree | 98cb34729c8f77ce237510816185d719ecf1de5d /source/blender | |
parent | 72199882587b20b7b72b5205cb84372fdc8da12c (diff) |
Fix modal bevel OP immediately stopping when called using enter key from search menu
Steps to reproduce were:
* Go to edit mode, select geometry
* Spacebar -> search for bevel OP
* Activate *using enter key*
* Immediately stops when releasing enter key
To fix we simply make sure the initial release event is ignored. For mouse events that wasn't an issue since activating an element is done on key release in menus. An alternative fix would be to do the same for enter key, but that's more risky. Also, checking event value is highly recommended anyway.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/mesh/editmesh_bevel.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/editors/mesh/editmesh_bevel.c b/source/blender/editors/mesh/editmesh_bevel.c index d640766ab93..847a7b5336e 100644 --- a/source/blender/editors/mesh/editmesh_bevel.c +++ b/source/blender/editors/mesh/editmesh_bevel.c @@ -361,9 +361,12 @@ static int edbm_bevel_modal(bContext *C, wmOperator *op, const wmEvent *event) case LEFTMOUSE: case PADENTER: case RETKEY: - edbm_bevel_calc(op); - edbm_bevel_exit(C, op); - return OPERATOR_FINISHED; + if (event->val == KM_PRESS) { + edbm_bevel_calc(op); + edbm_bevel_exit(C, op); + return OPERATOR_FINISHED; + } + break; /* Note this will prevent padplus and padminus to ever activate modal numinput. * This is not really an issue though, as we only expect positive values here... |