Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuho Vepsalainen <bebraw@gmail.com>2008-02-23 13:33:36 +0300
committerJuho Vepsalainen <bebraw@gmail.com>2008-02-23 13:33:36 +0300
commit206021113da61f352d96805af7e82e9d41dd70b9 (patch)
treef40167e81d4cf9d4b29a3b3fa539d73e372f222c /source/blender/src/header_node.c
parent14fafab60a5c5ecfdbbf8e532b4980207a191a45 (diff)
Nodes to be created at the location in which the mouse cursor was initially
This commit changes the way new nodes are created. Previously nodes were created at the last location of the mouse cursor before creating a new node. After this commit the nodes are created at the initial location in which the cursor was before the menu used to add the node was opened. This makes it possible for the user to predict where the new node appears without having to move it to desired location like before. There is no option for this as this behaviour is clearly superior to previous. Codewise it uses static variables. This is something to fix during 2.50 rewrite. Thanks to paprmh for contribution!
Diffstat (limited to 'source/blender/src/header_node.c')
-rw-r--r--source/blender/src/header_node.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/src/header_node.c b/source/blender/src/header_node.c
index ffd8cd5fc4b..dd6ae890b01 100644
--- a/source/blender/src/header_node.c
+++ b/source/blender/src/header_node.c
@@ -216,7 +216,7 @@ void do_node_addmenu(void *arg, int event)
else node->flag &= ~NODE_TEST;
}
- getmouseco_areawin(mval);
+ toolbox_mousepos(mval, 0 ); /* get initial mouse position */
areamouseco_to_ipoco(G.v2d, mval, &locx, &locy);
node= node_add_node(snode, event, locx, locy);