diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-03-05 12:51:23 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-03-05 12:51:23 +0300 |
commit | 4a4d71414e7f4604d5e0146cc362068dddb71be5 (patch) | |
tree | a27ad058f753617dc965ba58f2bacb93f58644d1 /source/blender/editors/space_node/node_edit.c | |
parent | 2089a17f7e69bb2106950b041486e23928065fb0 (diff) |
BLI_rect: add init from point functions
Initialize a rectangle from point+size.
Diffstat (limited to 'source/blender/editors/space_node/node_edit.c')
-rw-r--r-- | source/blender/editors/space_node/node_edit.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index 8a61857675c..54ddd9aed46 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -1069,12 +1069,9 @@ int node_find_indicated_socket(SpaceNode *snode, bNode **nodep, bNodeSocket **so /* check if we click in a socket */ for (node = snode->edittree->nodes.first; node; node = node->next) { - - rect.xmin = cursor[0] - (NODE_SOCKSIZE + 4); - rect.ymin = cursor[1] - (NODE_SOCKSIZE + 4); - rect.xmax = cursor[0] + (NODE_SOCKSIZE + 4); - rect.ymax = cursor[1] + (NODE_SOCKSIZE + 4); - + + BLI_rctf_init_pt_size(&rect, cursor, NODE_SOCKSIZE + 4); + if (!(node->flag & NODE_HIDDEN)) { /* extra padding inside and out - allow dragging on the text areas too */ if (in_out == SOCK_IN) { |