Fix recently added drag events closing menus

This commit is contained in:
Campbell Barton 2018-06-08 08:01:43 +02:00
parent 8f49299134
commit 009c38df53
1 changed files with 1 additions and 1 deletions

View File

@ -3763,7 +3763,7 @@ static int ui_do_but_BUT(
button_activate_state(C, but, BUTTON_STATE_WAIT_RELEASE);
return WM_UI_HANDLER_BREAK;
}
else if (event->type == LEFTMOUSE && but->block->handle) {
else if (event->type == LEFTMOUSE && event->val == KM_RELEASE && but->block->handle) {
/* regular buttons will be 'UI_SELECT', menu items 'UI_ACTIVE' */
if (!(but->flag & (UI_SELECT | UI_ACTIVE)))
data->cancel = true;