Fix for part of [#20251] Some Node UI problems
authorMatt Ebb <matt@mke3.net>
Mon, 18 Jan 2010 08:38:53 +0000 (08:38 +0000)
committerMatt Ebb <matt@mke3.net>
Mon, 18 Jan 2010 08:38:53 +0000 (08:38 +0000)
Tweaked the padding around sockets when dragging connections.

source/blender/editors/space_node/node_edit.c

index 8166cfa..9e10feb 100644 (file)
@@ -964,10 +964,10 @@ static int find_indicated_socket(SpaceNode *snode, bNode **nodep, bNodeSocket **
        /* check if we click in a socket */
        for(node= snode->edittree->nodes.first; node; node= node->next) {
                
-               rect.xmin = snode->mx - NODE_SOCKSIZE+3;
-               rect.ymin = snode->my - NODE_SOCKSIZE+3;
-               rect.xmax = rect.xmin + 2*NODE_SOCKSIZE+6;
-               rect.ymax = rect.ymin + 2*NODE_SOCKSIZE+6;
+               rect.xmin = snode->mx - (NODE_SOCKSIZE+4);
+               rect.ymin = snode->my - (NODE_SOCKSIZE+4);
+               rect.xmax = snode->mx + (NODE_SOCKSIZE+4);
+               rect.ymax = snode->my + (NODE_SOCKSIZE+4);
                
                if (!(node->flag & NODE_HIDDEN)) {
                        /* extra padding inside and out - allow dragging on the text areas too */