Fix T46306: Cursor sometimes jumps with num-slider buttons & Continuous Grab

More precise description of the issue: Clicking on the right side of a num-slider button with Continuous Grab enabled sometimes caused cursor to jump to the inner value indicator even though text editing was started.

Happened because data->ungrab_mval wasn't reset correctly after dragging.
This commit is contained in:
Julian Eisel 2015-09-30 01:04:11 +02:00
parent 32365bb06c
commit 491b1899de
Notes: blender-bot 2023-02-14 10:18:56 +01:00
Referenced by issue #46306, continuous grab causes jumping behavior of mouse cursor while adjusting values in sliders
1 changed files with 4 additions and 0 deletions

View File

@ -4529,6 +4529,10 @@ static int ui_do_but_SLI(bContext *C, uiBlock *block, uiBut *but, uiHandleButton
}
}
else {
#ifdef USE_CONT_MOUSE_CORRECT
/* reset! */
copy_v2_fl(data->ungrab_mval, FLT_MAX);
#endif
click = 1;
}
}