diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-05-21 04:04:57 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-05-21 04:06:24 +0300 |
commit | 9bfea67751dc59554c8928802b4e1f04278ab537 (patch) | |
tree | 2db338a7bbcefa7e2a4fc2a102ae97e9c2142619 /source/blender/editors/interface | |
parent | 1aa1a5311598416e8d7b427eec47de1ca1054488 (diff) |
UI: Use Ctrl+Wheel to cycle values
Conflicted with Alt for editing multiple values.
This could also conflict with global frame change at times.
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 90047607516..feb9b4047fd 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -3733,7 +3733,7 @@ static int ui_do_but_TOG(bContext *C, uiBut *but, uiHandleButtonData *data, cons button_activate_state(C, but, BUTTON_STATE_EXIT); return WM_UI_HANDLER_BREAK; } - else if (ELEM(event->type, WHEELDOWNMOUSE, WHEELUPMOUSE) && event->alt) { + else if (ELEM(event->type, WHEELDOWNMOUSE, WHEELUPMOUSE) && event->ctrl) { /* Support alt+wheel on expanded enum rows */ if (but->type == UI_BTYPE_ROW) { const int direction = (event->type == WHEELDOWNMOUSE) ? -1 : 1; @@ -4083,11 +4083,11 @@ static int ui_do_but_NUM(bContext *C, uiBlock *block, uiBut *but, uiHandleButton /* XXX hardcoded keymap check.... */ if (type == MOUSEPAN && event->alt) retval = WM_UI_HANDLER_BREAK; /* allow accumulating values, otherwise scrolling gets preference */ - else if (type == WHEELDOWNMOUSE && event->alt) { + else if (type == WHEELDOWNMOUSE && event->ctrl) { mx = but->rect.xmin; click = 1; } - else if (type == WHEELUPMOUSE && event->alt) { + else if (type == WHEELUPMOUSE && event->ctrl) { mx = but->rect.xmax; click = 1; } @@ -4372,11 +4372,11 @@ static int ui_do_but_SLI(bContext *C, uiBlock *block, uiBut *but, uiHandleButton /* XXX hardcoded keymap check.... */ if (type == MOUSEPAN && event->alt) retval = WM_UI_HANDLER_BREAK; /* allow accumulating values, otherwise scrolling gets preference */ - else if (type == WHEELDOWNMOUSE && event->alt) { + else if (type == WHEELDOWNMOUSE && event->ctrl) { mx = but->rect.xmin; click = 2; } - else if (type == WHEELUPMOUSE && event->alt) { + else if (type == WHEELUPMOUSE && event->ctrl) { mx = but->rect.xmax; click = 2; } @@ -4682,7 +4682,7 @@ static int ui_do_but_BLOCK(bContext *C, uiBut *but, uiHandleButtonData *data, co return WM_UI_HANDLER_BREAK; } else if (but->type == UI_BTYPE_MENU) { - if (ELEM(event->type, WHEELDOWNMOUSE, WHEELUPMOUSE) && event->alt) { + if (ELEM(event->type, WHEELDOWNMOUSE, WHEELUPMOUSE) && event->ctrl) { const int direction = (event->type == WHEELDOWNMOUSE) ? -1 : 1; data->value = ui_but_menu_step(but, direction); @@ -4857,7 +4857,7 @@ static int ui_do_but_COLOR(bContext *C, uiBut *but, uiHandleButtonData *data, co button_activate_state(C, but, BUTTON_STATE_MENU_OPEN); return WM_UI_HANDLER_BREAK; } - else if (ELEM(event->type, MOUSEPAN, WHEELDOWNMOUSE, WHEELUPMOUSE) && event->alt) { + else if (ELEM(event->type, MOUSEPAN, WHEELDOWNMOUSE, WHEELUPMOUSE) && event->ctrl) { ColorPicker *cpicker = but->custom_data; float hsv_static[3] = {0.0f}; float *hsv = cpicker ? cpicker->color_data : hsv_static; @@ -8194,7 +8194,7 @@ static int ui_handle_list_event(bContext *C, const wmEvent *event, ARegion *ar) if (val == KM_PRESS) { if (ELEM(type, UPARROWKEY, DOWNARROWKEY) || - ((ELEM(type, WHEELUPMOUSE, WHEELDOWNMOUSE) && event->alt))) + ((ELEM(type, WHEELUPMOUSE, WHEELDOWNMOUSE) && event->ctrl))) { const int value_orig = RNA_property_int_get(&but->rnapoin, but->rnaprop); int value, min, max, inc; |