diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-10-23 17:06:28 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-10-23 17:06:28 +0300 |
commit | 4ff10119f79170f1d297361e8afd8cae732ea1f1 (patch) | |
tree | 5bb9906868c93851745b1c621daa2fe4a9af2cda /source/blender/editors/space_node | |
parent | 08706122682507fd8f994109305f4120d54648ff (diff) |
Node Border Select: only frames inside border
Without this you can't easily select a few nodes inside a frame,
without selecting the whole frame, noted in T46540
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r-- | source/blender/editors/space_node/node_select.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/editors/space_node/node_select.c b/source/blender/editors/space_node/node_select.c index 78302fedd97..e2968b7003c 100644 --- a/source/blender/editors/space_node/node_select.c +++ b/source/blender/editors/space_node/node_select.c @@ -531,7 +531,15 @@ static int node_borderselect_exec(bContext *C, wmOperator *op) UI_view2d_region_to_view_rctf(&ar->v2d, &rectf, &rectf); for (node = snode->edittree->nodes.first; node; node = node->next) { - if (BLI_rctf_isect(&rectf, &node->totr, NULL)) { + bool select; + if (node->type == NODE_FRAME) { + select = BLI_rctf_inside_rctf(&rectf, &node->totr); + } + else { + select = BLI_rctf_isect(&rectf, &node->totr, NULL); + } + + if (select) { nodeSetSelected(node, (gesture_mode == GESTURE_MODAL_SELECT)); } else if (!extend) { |