Fix #108049: Nodes pasting can leave multiple active nodes #108535

Merged
Philipp Oeser merged 2 commits from lichtwerk/blender:108049 into blender-v3.6-release 2023-06-18 12:22:22 +02:00
1 changed files with 3 additions and 0 deletions
Showing only changes of commit 8a0d540552 - Show all commits

View File

@ -269,6 +269,9 @@ static int node_clipboard_paste_exec(bContext *C, wmOperator *op)
for (bNode *new_node : node_map.values()) {
nodeSetSelected(new_node, true);
/* Keep previous active node, this is in line with how objects are pasted. */
Review

this is in line with how objects are pasted

That seems like a reasonable tidbit for the commit message, but the added line really works by itself IMO. And if object copy & paste is ever changed, that might end up being more confusing than helpful!

>this is in line with how objects are pasted That seems like a reasonable tidbit for the commit message, but the added line really works by itself IMO. And if object copy & paste is ever changed, that might end up being more confusing than helpful!
new_node->flag &= ~NODE_ACTIVE;
/* The parent pointer must be redirected to new node. */
if (new_node->parent) {
if (node_map.contains(new_node->parent)) {