diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2011-11-24 13:26:19 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2011-11-24 13:26:19 +0400 |
commit | f35fa9e59fcb6240376d8d58d60939564a8c9ced (patch) | |
tree | feae3945fef39f0e86c2e51403471bfbba53b556 /source/blender/editors/space_node | |
parent | 7a2725048d9e1595fa2d188815653ab05bdbb9c0 (diff) |
Fix for wrong event clipping in open node groups (bug #29383). The internal node blocks of the group were created before the group node block itself, so the node group block clips events for internal nodes. Generally, blocks should be created just like the drawing order.
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r-- | source/blender/editors/space_node/node_draw.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c index 024db35a084..02a8b5cc9fb 100644 --- a/source/blender/editors/space_node/node_draw.c +++ b/source/blender/editors/space_node/node_draw.c @@ -933,15 +933,16 @@ void drawnodespace(const bContext *C, ARegion *ar, View2D *v2d) if(snode->nodetree) { bNode *node; - /* init ui blocks for opened node group trees first - * so they're in the correct depth stack order */ + node_uiblocks_init(C, snode->nodetree); + + /* uiBlocks must be initialized in drawing order for correct event clipping. + * Node group internal blocks added after the main group block. + */ for(node= snode->nodetree->nodes.first; node; node= node->next) { if(node->flag & NODE_GROUP_EDIT) node_uiblocks_init(C, (bNodeTree *)node->id); } - node_uiblocks_init(C, snode->nodetree); - node_update_nodetree(C, snode->nodetree, 0.0f, 0.0f); node_draw_nodetree(C, ar, snode, snode->nodetree); |