diff options
author | Campbell Barton <campbell@blender.org> | 2022-05-18 07:25:05 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-05-18 07:39:48 +0300 |
commit | d7053ba030f62c8eb597f6aa24525a96b3c42a17 (patch) | |
tree | 5c7ee720975dbd4dedd1ee479d8ee331cac01171 /source/blender/editors/space_node/node_select.cc | |
parent | ffbeb34f5faa8d0d5d5adb946bc8686e1f638fba (diff) |
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
Diffstat (limited to 'source/blender/editors/space_node/node_select.cc')
-rw-r--r-- | source/blender/editors/space_node/node_select.cc | 7 |
1 files changed, 7 insertions, 0 deletions
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 - |