diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-04-01 15:10:41 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-04-01 15:10:41 +0400 |
commit | fb25a86f43435e3eb60611cb8a5d3daefa09f21b (patch) | |
tree | 3cfae5742e5e48a8f142e54e8ca5b6bde0780dc9 /source/blender | |
parent | 77f815f67a99404a6c5d78108e4cc93336f388cf (diff) |
Fix T39537: Multi button editing is unreliable
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index b58c86fca5d..5a520a6df31 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -3477,10 +3477,21 @@ static int ui_do_but_NUM(bContext *C, uiBlock *block, uiBut *but, uiHandleButton } } else if (event->type == LEFTMOUSE && event->val != KM_PRESS) { - if (data->dragchange) - button_activate_state(C, but, BUTTON_STATE_EXIT); - else + if (data->dragchange) { +#ifdef USE_DRAG_MULTINUM + /* if we started multibutton but didnt drag, then edit */ + if (data->multi_data.init == BUTTON_MULTI_INIT_SETUP) { + click = 1; + } + else +#endif + { + button_activate_state(C, but, BUTTON_STATE_EXIT); + } + } + else { click = 1; + } } else if (event->type == MOUSEMOVE) { const enum eSnapType snap = ui_event_to_snap(event); @@ -3763,10 +3774,21 @@ static int ui_do_but_SLI(bContext *C, uiBlock *block, uiBut *but, uiHandleButton } } else if (event->type == LEFTMOUSE && event->val != KM_PRESS) { - if (data->dragchange) - button_activate_state(C, but, BUTTON_STATE_EXIT); - else + if (data->dragchange) { +#ifdef USE_DRAG_MULTINUM + /* if we started multibutton but didnt drag, then edit */ + if (data->multi_data.init == BUTTON_MULTI_INIT_SETUP) { + click = 1; + } + else +#endif + { + button_activate_state(C, but, BUTTON_STATE_EXIT); + } + } + else { click = 1; + } } else if (event->type == MOUSEMOVE) { #ifdef USE_DRAG_MULTINUM |