WM: fix node link & background drag

This commit is contained in:
Campbell Barton 2018-06-08 18:52:00 +02:00
parent 540e85d567
commit 2dc7555522
2 changed files with 13 additions and 9 deletions

View File

@ -726,11 +726,14 @@ static int node_link_modal(bContext *C, wmOperator *op, const wmEvent *event)
case RIGHTMOUSE:
case MIDDLEMOUSE:
{
node_link_exit(C, op, true);
if (event->val == KM_RELEASE) {
node_link_exit(C, op, true);
ED_area_headerprint(CTX_wm_area(C), NULL);
ED_region_tag_redraw(ar);
return OPERATOR_FINISHED;
ED_area_headerprint(CTX_wm_area(C), NULL);
ED_region_tag_redraw(ar);
return OPERATOR_FINISHED;
}
break;
}
}

View File

@ -225,11 +225,12 @@ static int snode_bg_viewmove_modal(bContext *C, wmOperator *op, const wmEvent *e
case LEFTMOUSE:
case MIDDLEMOUSE:
case RIGHTMOUSE:
MEM_freeN(nvm);
op->customdata = NULL;
return OPERATOR_FINISHED;
if (event->val == KM_RELEASE) {
MEM_freeN(nvm);
op->customdata = NULL;
return OPERATOR_FINISHED;
}
break;
}
return OPERATOR_RUNNING_MODAL;