diff options
author | Campbell Barton <campbell@blender.org> | 2022-07-21 09:23:33 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-07-21 09:23:33 +0300 |
commit | 2eeedbbca96306971a7605ade18ee42053b17e41 (patch) | |
tree | 05605226b15539a360711d570a35dc56ac374293 /source/blender/editors/interface/interface_handlers.c | |
parent | 7a736854603b640ca2a384a6cf05d0afc7fbe6dd (diff) |
Cleanup: add ISMOUSE_MOTION macro
Replace verbose ELEM(..) usage, now each kind of mouse event has it's
own macro.
Diffstat (limited to 'source/blender/editors/interface/interface_handlers.c')
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 141c1c50fa6..80fd0cbe16e 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -4509,7 +4509,7 @@ static int ui_do_but_HOTKEYEVT(bContext *C, } } else if (data->state == BUTTON_STATE_WAIT_KEY_EVENT) { - if (ELEM(event->type, MOUSEMOVE, INBETWEEN_MOUSEMOVE)) { + if (ISMOUSE_MOTION(event->type)) { return WM_UI_HANDLER_CONTINUE; } if (event->type == EVT_UNKNOWNKEY) { @@ -4575,7 +4575,7 @@ static int ui_do_but_KEYEVT(bContext *C, } } else if (data->state == BUTTON_STATE_WAIT_KEY_EVENT) { - if (ELEM(event->type, MOUSEMOVE, INBETWEEN_MOUSEMOVE)) { + if (ISMOUSE_MOTION(event->type)) { return WM_UI_HANDLER_CONTINUE; } @@ -8097,7 +8097,7 @@ static int ui_do_button(bContext *C, uiBlock *block, uiBut *but, const wmEvent * #ifdef USE_DRAG_MULTINUM data = but->active; if (data) { - if (ELEM(event->type, MOUSEMOVE, INBETWEEN_MOUSEMOVE) || + if (ISMOUSE_MOTION(event->type) || /* if we started dragging, progress on any event */ (data->multi_data.init == BUTTON_MULTI_INIT_SETUP)) { if (ELEM(but->type, UI_BTYPE_NUM, UI_BTYPE_NUM_SLIDER) && |