Bugfix #27105
authorTon Roosendaal <ton@blender.org>
Sat, 11 Jun 2011 13:12:57 +0000 (13:12 +0000)
committerTon Roosendaal <ton@blender.org>
Sat, 11 Jun 2011 13:12:57 +0000 (13:12 +0000)
Node editor: collapsed node didn't allow to size it using the
right hand side grab thingemabobs.

source/blender/editors/space_node/node_edit.c

index 99f2ea99efca9eb5a9442c009265be1c90365da8..e539334c282b0b40ea461d402be635a68dfdf119 100644 (file)
@@ -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");