diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-01-30 13:00:54 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-01-30 13:00:54 +0400 |
commit | a4603667b8582f790eb47d0096db1198731e0841 (patch) | |
tree | af4d226419b4f379f787d837249338b79aa4b42f /source/blender/editors/space_node | |
parent | 28b72d09e5b53736bcd34ff10521b33a57dca045 (diff) |
Removed check for active node in edited node group to allow node group editing toggle. This enables closing an empty node group again (after removing all nodes or when empty group is added via menu). Fix for bug #30018.
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r-- | source/blender/editors/space_node/node_edit.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c index 71f0917a4f3..fe734e53651 100644 --- a/source/blender/editors/space_node/node_edit.c +++ b/source/blender/editors/space_node/node_edit.c @@ -855,14 +855,13 @@ static int node_group_edit_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(e SpaceNode *snode = CTX_wm_space_node(C); bNode *gnode; - gnode = nodeGetActive(snode->edittree); - if (!gnode) - return OPERATOR_CANCELLED; - /* XXX callback? */ - if(gnode && gnode->id && GS(gnode->id->name)==ID_NT && gnode->id->lib) { - uiPupMenuOkee(C, op->type->idname, "Make group local?"); - return OPERATOR_CANCELLED; + if (snode->nodetree==snode->edittree) { + gnode = nodeGetActive(snode->edittree); + if(gnode && gnode->id && GS(gnode->id->name)==ID_NT && gnode->id->lib) { + uiPupMenuOkee(C, op->type->idname, "Make group local?"); + return OPERATOR_CANCELLED; + } } return node_group_edit_exec(C, op); |