diff options
author | Ton Roosendaal <ton@blender.org> | 2011-06-11 17:12:57 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2011-06-11 17:12:57 +0400 |
commit | e0dee9b41d2ecc6ef6062becd7ba84a1d3d3163e (patch) | |
tree | dfebb3b151ed7730ea04af5b967b4eb9dcc931a8 | |
parent | 3361ae0271b8db7a56f107265fa018ffb6646c28 (diff) |
Bugfix #27105
Node editor: collapsed node didn't allow to size it using the
right hand side grab thingemabobs.
-rw-r--r-- | source/blender/editors/space_node/node_edit.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index 99f2ea99efc..e539334c282 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -1366,10 +1366,17 @@ static int node_resize_invoke(bContext *C, wmOperator *op, wmEvent *event) UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &snode->mx, &snode->my); - /* rect we're interested in is just the bottom right corner */ totr= node->totr; - totr.xmin= totr.xmax-10.0f; - totr.ymax= totr.ymin+10.0f; + + if(node->flag & NODE_HIDDEN) { + /* right part of node */ + totr.xmin= node->totr.xmax-20.0f; + } + else { + /* bottom right corner */ + totr.xmin= totr.xmax-10.0f; + totr.ymax= totr.ymin+10.0f; + } if(BLI_in_rctf(&totr, snode->mx, snode->my)) { NodeSizeWidget *nsw= MEM_callocN(sizeof(NodeSizeWidget), "size widget op data"); |