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...
This commit is contained in:
Bastien Montagne 2019-05-15 22:51:12 +02:00
parent b05038fef7
commit 59b7f3a164
Notes: blender-bot 2023-02-14 06:42:54 +01:00
Referenced by issue #64933, "Dots" in node editor can no longer be selected by just clicking on them
Referenced by issue #64660, no access to node connectors when a node is inside a layout frame
1 changed files with 11 additions and 1 deletions

View File

@ -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]);