Fix T55568: second click event ignored
authorCampbell Barton <ideasman42@gmail.com>
Thu, 21 Jun 2018 08:58:03 +0000 (10:58 +0200)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 21 Jun 2018 12:04:43 +0000 (14:04 +0200)
Double-click handling caused the second click to be ignored
for keymaps that only handle click.

source/blender/windowmanager/intern/wm_event_system.c

index c9a09f46a3718f04da39f30eb3a9334c42afae24..76e9b11632156a30accc807efc948b0981400d39 100644 (file)
@@ -2329,6 +2329,13 @@ static int wm_handlers_do(bContext *C, wmEvent *event, ListBase *handlers)
                                else if (event->val == KM_DBL_CLICK) {
                                        event->val = KM_PRESS;
                                        action |= wm_handlers_do_intern(C, event, handlers);
+                                       event->val = KM_RELEASE;
+                                       action |= wm_handlers_do_intern(C, event, handlers);
+
+                                       if (wm_action_not_handled(action)) {
+                                               event->val = KM_CLICK;
+                                               action |= wm_handlers_do_intern(C, event, handlers);
+                                       }
 
                                        /* revert value if not handled */
                                        if (wm_action_not_handled(action)) {