Fix for wrong event clipping in open node groups (bug #29383). The internal node...
authorLukas Toenne <lukas.toenne@googlemail.com>
Thu, 24 Nov 2011 09:26:19 +0000 (09:26 +0000)
committerLukas Toenne <lukas.toenne@googlemail.com>
Thu, 24 Nov 2011 09:26:19 +0000 (09:26 +0000)
source/blender/editors/space_node/node_draw.c

index 024db35a084910ecbf2ff137f8c40b6768ea1332..02a8b5cc9fba586069aec9fc523cc5f621863491 100644 (file)
@@ -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);