Fix T55178: Cursor fails to restore on cancel

574c0fe38f caused complications
restoring the cursor.

Use WM_cursor_modal_set/restore which is intended for operator use,
calling ED_region_cursor_set after an operator runs isn't reliable.
This commit is contained in:
2018-05-24 14:23:32 +02:00
parent c1361d2651
commit 39aea50155
4 changed files with 11 additions and 10 deletions

View File

@@ -351,7 +351,8 @@ void initMouseInputMode(TransInfo *t, MouseInput *mi, MouseInputMode mode)
case HLP_NONE:
/* INPUT_VECTOR, INPUT_CUSTOM_RATIO, INPUT_CUSTOM_RATIO_FLIP */
if (t->flag & T_MODAL) {
WM_cursor_set(win, BC_NSEW_SCROLLCURSOR);
t->flag |= T_MODAL_CURSOR_SET;
WM_cursor_modal_set(win, BC_NSEW_SCROLLCURSOR);
}
break;
case HLP_SPRING:
@@ -360,7 +361,8 @@ void initMouseInputMode(TransInfo *t, MouseInput *mi, MouseInputMode mode)
case HLP_HARROW:
case HLP_VARROW:
if (t->flag & T_MODAL) {
WM_cursor_set(win, CURSOR_NONE);
t->flag |= T_MODAL_CURSOR_SET;
WM_cursor_modal_set(win, CURSOR_NONE);
}
break;
default: