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:
Diffstat (limited to 'source/blender/editors/space_node/node_relationships.cc')
-rw-r--r--source/blender/editors/space_node/node_relationships.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/source/blender/editors/space_node/node_relationships.cc b/source/blender/editors/space_node/node_relationships.cc
index c6c3ca27d6e..e908a61eed9 100644
--- a/source/blender/editors/space_node/node_relationships.cc
+++ b/source/blender/editors/space_node/node_relationships.cc
@@ -880,6 +880,8 @@ static void node_link_exit(bContext *C, wmOperator *op, bool apply_links)
bNodeTree *ntree = snode->edittree;
bNodeLinkDrag *nldrag = (bNodeLinkDrag *)op->customdata;
bool do_tag_update = false;
+ /* View will be reset if no links connect. */
+ bool reset_view = true;
/* avoid updates while applying links */
ntree->is_updating = true;
@@ -917,6 +919,8 @@ static void node_link_exit(bContext *C, wmOperator *op, bool apply_links)
if (link->tonode) {
do_tag_update |= (do_tag_update || node_connected_to_output(bmain, ntree, link->tonode));
}
+
+ reset_view = false;
}
else {
nodeRemLink(ntree, link);
@@ -930,6 +934,10 @@ static void node_link_exit(bContext *C, wmOperator *op, bool apply_links)
snode_dag_update(C, snode);
}
+ if (reset_view) {
+ UI_view2d_edge_pan_cancel(C, &nldrag->pan_data);
+ }
+
BLI_remlink(&snode->runtime->linkdrag, nldrag);
/* links->data pointers are either held by the tree or freed already */
BLI_freelistN(&nldrag->links);
@@ -1207,6 +1215,8 @@ static void node_link_cancel(bContext *C, wmOperator *op)
BLI_remlink(&snode->runtime->linkdrag, nldrag);
+ UI_view2d_edge_pan_cancel(C, &nldrag->pan_data);
+
BLI_freelistN(&nldrag->links);
MEM_freeN(nldrag);
clear_picking_highlight(&snode->edittree->links);
@@ -1258,7 +1268,8 @@ void NODE_OT_link(wmOperatorType *ot)
NODE_EDGE_PAN_OUTSIDE_PAD,
NODE_EDGE_PAN_SPEED_RAMP,
NODE_EDGE_PAN_MAX_SPEED,
- NODE_EDGE_PAN_DELAY);
+ NODE_EDGE_PAN_DELAY,
+ NODE_EDGE_PAN_ZOOM_INFLUENCE);
}
/** \} */