diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2019-05-15 23:51:12 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2019-05-16 12:13:09 +0300 |
commit | 59b7f3a16463f2286a8349028f15e7e7a3be06dc (patch) | |
tree | 36042fb9e3be0ac43693dab6eec137a308fc54d9 /source/blender/editors | |
parent | b05038fef7e17aec518bc9ab2dbb7163628a3f4c (diff) |
Fix T64660: no access to node connectors when a node is inside a layout frame.
Note that the same issue actually showed without a frame node, when
trying to click-drag on a socket on its 'inside node' part, you would get
same behavior.
Only solution I can see here is to prevent Node selection to go on when
user clicks on one of its sockets, there is no way afaik to make
drag-from-socket to start if we keep select-node operator running
modal, since both operators (NODE_OT_select and NODE_OT_link) use the
same shortcut, if select (which is checked first, being a Tool) returns
modal, then event is considered handled it seems, even though
Passthrough is also returned...
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_node/node_select.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/editors/space_node/node_select.c b/source/blender/editors/space_node/node_select.c index aab328249fe..a8331c26ce6 100644 --- a/source/blender/editors/space_node/node_select.c +++ b/source/blender/editors/space_node/node_select.c @@ -495,7 +495,17 @@ static int node_mouse_select(bContext *C, } } - if (!sock) { + /* In case we do two-steps selection, we do not want to select the node if some valid socket + * is below the mouse, as that would prevent draging from sockets (NODE_OT_link) + * to be properly triggered. See T64660. */ + if (wait_to_deselect_others) { + if (node_find_indicated_socket(snode, &node, &sock, cursor, SOCK_IN) || + node_find_indicated_socket(snode, &node, &sock, cursor, SOCK_OUT)) { + ret_value = OPERATOR_CANCELLED; + } + } + + if (sock == NULL) { /* find the closest visible node */ node = node_under_mouse_select(snode->edittree, (int)cursor[0], (int)cursor[1]); |