Cleanup: Simplify arguments to deselect all nodes function

Take the node tree as an argument directly instead of retrieving it from
the editor struct. Then use the utility function in two more places.
This commit is contained in:
Hans Goudey
2022-12-20 17:14:34 -06:00
parent d0348bcb8a
commit 8bbf823716
8 changed files with 50 additions and 51 deletions

View File

@@ -2335,7 +2335,7 @@ static int node_clipboard_paste_exec(bContext *C, wmOperator *op)
ED_preview_kill_jobs(CTX_wm_manager(C), CTX_data_main(C));
/* deselect old nodes */
node_deselect_all(*snode);
node_deselect_all(*ntree);
/* calculate "barycenter" for placing on mouse cursor */
float2 center = {0.0f, 0.0f};