Fix T55568: second click event ignored

This commit is contained in:
Campbell Barton 2018-06-21 19:26:21 +02:00
parent 51f6b25afd
commit 68f4a4641e
Notes: blender-bot 2023-02-14 05:42:02 +01:00
Referenced by issue #55568, Pressing tab twice fast doesn't toggle edit mode twice
1 changed files with 2 additions and 1 deletions

View File

@ -2327,6 +2327,7 @@ static int wm_handlers_do(bContext *C, wmEvent *event, ListBase *handlers)
}
}
else if (event->val == KM_DBL_CLICK) {
/* The underlying event is a press, so try and handle this. */
event->val = KM_PRESS;
action |= wm_handlers_do_intern(C, event, handlers);
@ -3569,7 +3570,7 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int U
/* if previous event was same type, and previous was release, and now it presses... */
if (wm_event_is_double_click(&event, evt)) {
CLOG_INFO(WM_LOG_HANDLERS, 1, "Send double click");
evt->val = event.val = KM_DBL_CLICK;
event.val = KM_DBL_CLICK;
}
/* this case happens on holding a key pressed, it should not generate