Nodes: Remove node after link drag search cancel

Remove the node if the transform operation is cancelled rather than
confirmed. This is consistent with the regular search menu.
This commit is contained in:
Hans Goudey 2022-08-01 17:03:21 -05:00
parent 2c00889d3e
commit 1dc503b33a
1 changed files with 1 additions and 0 deletions

View File

@ -232,6 +232,7 @@ static void link_drag_search_exec_fn(bContext *C, void *arg1, void *arg2)
PointerRNA ptr;
WM_operator_properties_create_ptr(&ptr, ot);
RNA_boolean_set(&ptr, "view2d_edge_pan", true);
RNA_boolean_set(&ptr, "remove_on_cancel", true);
WM_operator_name_call_ptr(C, ot, WM_OP_INVOKE_DEFAULT, &ptr, nullptr);
WM_operator_properties_free(&ptr);
}