From d7053ba030f62c8eb597f6aa24525a96b3c42a17 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 18 May 2022 14:25:05 +1000 Subject: Fix T98191: Alt-LMB for node detach fails with RMB select Regression caused by [0] which changed node selection to use PRESS for selection and CLICK_DRAG to transform the selection. This conflicted with Alt-LMB which would select the node then pass-though to node.background_sample, preventing the drag event from being activated. Resolve by only activating background-sample when the cursor isn't over a node or socket. [0]: 4c3e91e5f565b81dd79b5d42f55be5b93662d410 --- source/blender/editors/space_node/node_select.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source/blender/editors/space_node/node_select.cc') diff --git a/source/blender/editors/space_node/node_select.cc b/source/blender/editors/space_node/node_select.cc index db523651534..005dbc1eb10 100644 --- a/source/blender/editors/space_node/node_select.cc +++ b/source/blender/editors/space_node/node_select.cc @@ -48,6 +48,8 @@ namespace blender::ed::space_node { +static bool is_event_over_node_or_socket(bContext *C, const wmEvent *event); + /** * Function to detect if there is a visible view3d that uses workbench in texture mode. * This function is for fixing T76970 for Blender 2.83. The actual fix should add a mechanism in @@ -98,6 +100,11 @@ rctf node_frame_rect_inside(const bNode &node) return frame_inside; } +bool node_or_socket_isect_event(bContext *C, const wmEvent *event) +{ + return is_event_over_node_or_socket(C, event); +} + static bool node_frame_select_isect_mouse(bNode *node, const float2 &mouse) { /* Frame nodes are selectable by their borders (including their whole rect - as for other nodes - -- cgit v1.2.3