Fix box select ignoring selection mode in node editors

Box select is broken for all node editors. It ignores selection modes and always uses the mode `Set a new selection`.

The operator `NODE_OT_select_box` works fine, but clicking anywhere in the node editor calls `NODE_OT_select` first, so we need to make sure it has no undesired side effects when it is not run.

Pull Request: https://projects.blender.org/blender/blender/pulls/133736
This commit is contained in:
Habib Gahbiche
2025-01-30 12:45:50 +01:00
parent 22582bf6f0
commit d19fe522e4

View File

@@ -4694,7 +4694,7 @@ def _template_view3d_paint_mask_select_loop(params):
def _template_node_select(*, type, value, select_passthrough):
items = [
("node.select", {"type": type, "value": value},
{"properties": [("deselect_all", True), ("select_passthrough", select_passthrough)]}),
{"properties": [("deselect_all", False), ("select_passthrough", select_passthrough)]}),
("node.select", {"type": type, "value": value, "ctrl": True}, None),
("node.select", {"type": type, "value": value, "alt": True}, None),
("node.select", {"type": type, "value": value, "ctrl": True, "alt": True}, None),