diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-05-21 03:46:22 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-05-21 03:46:22 +0300 |
commit | 1aa1a5311598416e8d7b427eec47de1ca1054488 (patch) | |
tree | 57126bdea3107e2243efceb37ff2359a31b4599d /source | |
parent | 2b0613b948c2de2d31044ee4f8f82463732b1f15 (diff) |
UI: ignore mouse wheel while editing text
Mouse wheel was used as home/end.
Was annoying since it could happen by accident.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 11254ec0e3f..90047607516 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -3136,6 +3136,9 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle ui_searchbox_event(C, data->searchbox, but, event); break; } + if (event->type == WHEELDOWNMOUSE) { + break; + } /* fall-through */ case ENDKEY: ui_textedit_move(but, data, STRCUR_DIR_NEXT, @@ -3151,6 +3154,9 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle ui_searchbox_event(C, data->searchbox, but, event); break; } + if (event->type == WHEELUPMOUSE) { + break; + } /* fall-through */ case HOMEKEY: ui_textedit_move(but, data, STRCUR_DIR_PREV, |