WM: fix drag events applying after release

This commit is contained in:
Campbell Barton 2018-06-07 20:37:28 +02:00
parent cfc1ddeff7
commit 8f49299134
Notes: blender-bot 2023-02-14 05:45:28 +01:00
Referenced by issue #55452, Crash on saving with visible particle system
Referenced by issue #55413, Blender GUI draggin and pressing
1 changed files with 8 additions and 3 deletions

View File

@ -2252,9 +2252,14 @@ static int wm_handlers_do(bContext *C, wmEvent *event, ListBase *handlers)
/* eventstate stores if previous event was a KM_PRESS, in case that
* wasn't handled, the KM_RELEASE will become a KM_CLICK */
if (win && event->val == KM_PRESS) {
win->eventstate->check_click = true;
win->eventstate->check_drag = true;
if (win != NULL) {
if (event->val == KM_PRESS) {
win->eventstate->check_click = true;
win->eventstate->check_drag = true;
}
else if (event->val == KM_RELEASE) {
win->eventstate->check_drag = false;
}
}
if (win && win->eventstate->prevtype == event->type) {