Commit: 9bfea67751dc59554c8928802b4e1f04278ab537
Author: Campbell Barton
Date:   Thu May 21 11:04:57 2015 +1000
Branches: master
https://developer.blender.org/rB9bfea67751dc59554c8928802b4e1f04278ab537

UI: Use Ctrl+Wheel to cycle values

Conflicted with Alt for editing multiple values.
This could also conflict with global frame change at times.

===================================================================

M       source/blender/editors/interface/interface_handlers.c

===================================================================

diff --git a/source/blender/editors/interface/interface_handlers.c 
b/source/blender/editors/interface/interface_handlers.c
index 9004760..feb9b40 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;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to