Fix T100521: Nodes added with link drag search not added to frame

Use macro NODE_OT_translate_attach for attaching node created through
link-drag-search to frame, as suggested by Leon Schittek (@lone_noel)
in D15888.

Differential Revision: https://developer.blender.org/D15920
This commit is contained in:
Dominik Fill 2022-09-08 17:03:54 -05:00 committed by Hans Goudey
parent ff8cd48418
commit 4a71765f9a
Notes: blender-bot 2023-02-14 04:31:04 +01:00
Referenced by commit ea474dda62, Fix: Node edge pan and remove on cancel doesn't work
Referenced by issue #100521, Node doesn't belong to frame when added through link drag search
1 changed files with 1 additions and 1 deletions

View File

@ -227,7 +227,7 @@ static void link_drag_search_exec_fn(bContext *C, void *arg1, void *arg2)
ED_node_tree_propagate_change(C, &bmain, snode.edittree);
/* Start translation operator with the new node. */
wmOperatorType *ot = WM_operatortype_find("TRANSFORM_OT_translate", true);
wmOperatorType *ot = WM_operatortype_find("NODE_OT_translate_attach", true);
BLI_assert(ot);
PointerRNA ptr;
WM_operator_properties_create_ptr(&ptr, ot);