From 81f2e68e208215a45d426052d92ed2064c7d017c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 26 Oct 2017 16:08:45 +1100 Subject: Event System: check_click was left set Caused by own change 137586a13c --- .../blender/windowmanager/intern/wm_event_system.c | 25 +++++++++++++--------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'source/blender/windowmanager') diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 6ebe1671afc..a71202bfa71 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -2204,19 +2204,24 @@ static int wm_handlers_do(bContext *C, wmEvent *event, ListBase *handlers) if ((event->val == KM_RELEASE) && (win->eventstate->prevval == KM_PRESS) && - (win->eventstate->check_click == true) && - ((abs(event->x - win->eventstate->prevclickx)) <= WM_EVENT_CLICK_WIGGLE_ROOM && - (abs(event->y - win->eventstate->prevclicky)) <= WM_EVENT_CLICK_WIGGLE_ROOM)) + (win->eventstate->check_click == true)) { - event->val = KM_CLICK; - - if (G.debug & (G_DEBUG_HANDLERS)) { - printf("%s: handling CLICK\n", __func__); - } + if ((abs(event->x - win->eventstate->prevclickx)) <= WM_EVENT_CLICK_WIGGLE_ROOM && + (abs(event->y - win->eventstate->prevclicky)) <= WM_EVENT_CLICK_WIGGLE_ROOM) + { + event->val = KM_CLICK; - action |= wm_handlers_do_intern(C, event, handlers); + if (G.debug & (G_DEBUG_HANDLERS)) { + printf("%s: handling CLICK\n", __func__); + } - event->val = KM_RELEASE; + action |= wm_handlers_do_intern(C, event, handlers); + + event->val = KM_RELEASE; + } + else { + win->eventstate->check_click = 0; + } } else if (event->val == KM_DBL_CLICK) { event->val = KM_PRESS; -- cgit v1.2.3