diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-08-02 20:01:05 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-08-02 20:01:05 +0400 |
commit | 7aa44d088fcfb866ab58a6ed3d359a8acd6fe972 (patch) | |
tree | 9b49dfcac4fea55e80c01e43e5499c0bb275003b /source | |
parent | 64aa98643d9de3879898c7120ecd5cb72f61c4b7 (diff) |
Node selection: make node active before it could be unselected by extending
selection, which matches behavior of all other areas in blender.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_node/node_select.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/source/blender/editors/space_node/node_select.c b/source/blender/editors/space_node/node_select.c index 603603b9f07..71739d97508 100644 --- a/source/blender/editors/space_node/node_select.c +++ b/source/blender/editors/space_node/node_select.c @@ -368,9 +368,17 @@ static int node_mouse_select(Main *bmain, SpaceNode *snode, ARegion *ar, const i node = node_under_mouse_select(snode->edittree, mx, my); if (node) { - node_toggle(node); - - ED_node_set_active(bmain, snode->edittree, node); + if ((node->flag & SELECT) && (node->flag & NODE_ACTIVE) == 0) { + /* if node is selected but not active make it active + * before it'll be desleected + */ + ED_node_set_active(bmain, snode->edittree, node); + } + else { + node_toggle(node); + ED_node_set_active(bmain, snode->edittree, node); + } + selected = 1; } } |