[Bf-blender-cvs] [bf77efb684e] blender2.8: WM: fix node link & background drag

Campbell Barton noreply at git.blender.org
Fri Jun 8 19:04:05 CEST 2018


Commit: bf77efb684eb6f7018654562cc749799ebfdde9e
Author: Campbell Barton
Date:   Fri Jun 8 18:52:00 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBbf77efb684eb6f7018654562cc749799ebfdde9e

WM: fix node link & background drag

===================================================================

M	source/blender/editors/space_node/node_relationships.c
M	source/blender/editors/space_node/node_view.c

===================================================================

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;



More information about the Bf-blender-cvs mailing list