Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-06-08 19:52:00 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-06-08 20:03:29 +0300
commitbf77efb684eb6f7018654562cc749799ebfdde9e (patch)
treedfd44b3ba2e7f1bf68426d25362369d7e6e4eaf1
parentf8d7df6f162520ee4da46f54d863c45a2b78cc8c (diff)
WM: fix node link & background drag
-rw-r--r--source/blender/editors/space_node/node_relationships.c11
-rw-r--r--source/blender/editors/space_node/node_view.c11
2 files changed, 13 insertions, 9 deletions
diff --git a/source/blender/editors/space_node/node_relationships.c b/source/blender/editors/space_node/node_relationships.c
index b0d8b51f8e2..682174ebbed 100644
--- a/source/blender/editors/space_node/node_relationships.c
+++ b/source/blender/editors/space_node/node_relationships.c
@@ -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;
}
}
diff --git a/source/blender/editors/space_node/node_view.c b/source/blender/editors/space_node/node_view.c
index 1cf377643a3..d52a6a89413 100644
--- a/source/blender/editors/space_node/node_view.c
+++ b/source/blender/editors/space_node/node_view.c
@@ -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;