UI: ignore mouse wheel while editing text

Mouse wheel was used as home/end.
Was annoying since it could happen by accident.
This commit is contained in:
Campbell Barton 2015-05-21 10:46:22 +10:00
parent 2b0613b948
commit 1aa1a53115
1 changed files with 6 additions and 0 deletions

View File

@ -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,