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:
authorJacques Lucke <jacques@blender.org>2022-02-07 19:56:25 +0300
committerJacques Lucke <jacques@blender.org>2022-02-07 19:56:25 +0300
commit2f868e5647009434c4a1b9afddc48f6180a2bb60 (patch)
tree0eebbd8d444c3db2f0c8bf9492c9c01adc553676 /source/blender/editors
parent3cd686cae8e9a767fb6d6a4e4206e4ad24725bb8 (diff)
Fix T95578: missing update when linking selected nodes
This removes a "narrow" update in `snode_autoconnect` in favor of the more general update in `node_make_link_exec`.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/space_node/node_relationships.cc13
1 files changed, 3 insertions, 10 deletions
diff --git a/source/blender/editors/space_node/node_relationships.cc b/source/blender/editors/space_node/node_relationships.cc
index fd9420b173d..bc79925b51d 100644
--- a/source/blender/editors/space_node/node_relationships.cc
+++ b/source/blender/editors/space_node/node_relationships.cc
@@ -365,10 +365,7 @@ void sort_multi_input_socket_links(SpaceNode &snode,
}
}
-static void snode_autoconnect(Main &bmain,
- SpaceNode &snode,
- const bool allow_multiple,
- const bool replace)
+static void snode_autoconnect(SpaceNode &snode, const bool allow_multiple, const bool replace)
{
bNodeTree *ntree = snode.edittree;
Vector<bNode *> sorted_nodes;
@@ -441,10 +438,6 @@ static void snode_autoconnect(Main &bmain,
}
}
}
-
- if (numlinks > 0) {
- BKE_ntree_update_main_tree(&bmain, ntree, nullptr);
- }
}
/** \} */
@@ -1304,13 +1297,13 @@ static int node_make_link_exec(bContext *C, wmOperator *op)
ED_preview_kill_jobs(CTX_wm_manager(C), &bmain);
- snode_autoconnect(bmain, snode, true, replace);
+ snode_autoconnect(snode, true, replace);
/* deselect sockets after linking */
node_deselect_all_input_sockets(snode, false);
node_deselect_all_output_sockets(snode, false);
- ED_node_tree_propagate_change(C, CTX_data_main(C), snode.edittree);
+ ED_node_tree_propagate_change(C, &bmain, snode.edittree);
return OPERATOR_FINISHED;
}