UI: Activate (unused) tab button-type on press instead of release

Even if we want to support drag & drop, seems like most other apps that
support drag & drop for tabs activate the tab first anyway.
This commit is contained in:
Julian Eisel 2018-04-13 10:30:47 +02:00
parent b5570337b6
commit 9599ed3ba7
1 changed files with 1 additions and 1 deletions

View File

@ -3879,7 +3879,7 @@ static int ui_do_but_KEYEVT(
static int ui_do_but_TAB(bContext *C, uiBut *but, uiHandleButtonData *data, const wmEvent *event)
{
if (data->state == BUTTON_STATE_HIGHLIGHT) {
if (ELEM(event->type, LEFTMOUSE, PADENTER, RETKEY) && event->val == KM_RELEASE) {
if (ELEM(event->type, LEFTMOUSE, PADENTER, RETKEY) && event->val == KM_PRESS) {
button_activate_state(C, but, BUTTON_STATE_EXIT);
return WM_UI_HANDLER_CONTINUE;
}