diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-05-20 15:04:59 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-05-20 15:07:55 +0300 |
commit | eb57377f12123587a894582458c46aa09ef7c61d (patch) | |
tree | 8d2093c91966addaa1485a6112e1058dfff692bf /source/blender/editors/interface/interface_eyedropper_colorband.c | |
parent | 7d3bf5166d6782b0e6cde48c1a998414d83aba9d (diff) |
Fix T76794: Number button cursor overrides eyedropper cursor
Pressing 'E' over a number button to pick a distance was keeping
left-right arrows instead of using the eye-dropper cursor.
Workaround this by clearing the active button before setting the cursor.
Diffstat (limited to 'source/blender/editors/interface/interface_eyedropper_colorband.c')
-rw-r--r-- | source/blender/editors/interface/interface_eyedropper_colorband.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_eyedropper_colorband.c b/source/blender/editors/interface/interface_eyedropper_colorband.c index be23eacafff..24d06361c54 100644 --- a/source/blender/editors/interface/interface_eyedropper_colorband.c +++ b/source/blender/editors/interface/interface_eyedropper_colorband.c @@ -304,7 +304,10 @@ static int eyedropper_colorband_invoke(bContext *C, wmOperator *op, const wmEven { /* init */ if (eyedropper_colorband_init(C, op)) { - WM_cursor_modal_set(CTX_wm_window(C), WM_CURSOR_EYEDROPPER); + wmWindow *win = CTX_wm_window(C); + /* Workaround for de-activating the button clearing the cursor, see T76794 */ + UI_context_active_but_clear(C, win, CTX_wm_region(C)); + WM_cursor_modal_set(win, WM_CURSOR_EYEDROPPER); /* add temp handler */ WM_event_add_modal_handler(C, op); |