Merge branch 'master' into blender2.8
authorCampbell Barton <ideasman42@gmail.com>
Thu, 21 Jun 2018 08:32:16 +0000 (10:32 +0200)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 21 Jun 2018 08:32:16 +0000 (10:32 +0200)
1  2 
source/blender/editors/interface/interface_handlers.c
source/blender/windowmanager/intern/wm_event_system.c

index c756d6ed1ef48a4e5bdc0ac1dac1d239e60b8dd7,48d9e18686311aa440bd0e49c7f5131215d990d4..f999bbb62f31e5fb965b7548f3ac2dcc1d39840e
@@@ -9586,15 -9631,11 +9586,20 @@@ static int ui_handle_menu_event
                retval = ui_handle_menu_button(C, event, menu);
        }
  
 +#ifdef USE_UI_POPOVER_ONCE
 +      if (block->flag & UI_BLOCK_POPOVER_ONCE) {
 +              if ((event->type == LEFTMOUSE) && (event->val == KM_RELEASE)) {
 +                      UI_popover_once_clear(menu->popup_create_vars.arg);
 +                      block->flag &= ~UI_BLOCK_POPOVER_ONCE;
 +              }
 +      }
 +#endif
 +
+       /* Don't handle double click events, rehandle as regular press/release. */
+       if (retval == WM_UI_HANDLER_CONTINUE && event->val == KM_DBL_CLICK) {
+               return retval;
+       }
        /* if we set a menu return value, ensure we continue passing this on to
         * lower menus and buttons, so always set continue then, and if we are
         * inside the region otherwise, ensure we swallow the event */