diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-03-30 22:26:58 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-03-30 22:26:58 +0400 |
commit | 54ddfe1c4857ee4c6ad62c242b48a48fb0eff559 (patch) | |
tree | f48fcec6c65f28d92ef48f2acfb21b066ba4b334 /source/blender/editors/interface/interface_layout.c | |
parent | dbdb5893b2e46ce035ae6811a7fa7fb8811ae2d5 (diff) |
2.5:
* Fix ANIM button, didn't work and was leaking memory.
* Transform ops: Edition -> Editing.
Diffstat (limited to 'source/blender/editors/interface/interface_layout.c')
-rw-r--r-- | source/blender/editors/interface/interface_layout.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 5ede83fafd6..00353406283 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -294,14 +294,22 @@ static void ui_item_buts(uiBlock *block, uiItem *item, int x, int y, int w, int else if(item->type == ITEM_OPERATOR) { /* operator */ uiItemOp *opitem= (uiItemOp*)item; + uiBut *but; if(item->icon && item->name) - uiDefIconTextButO(block, BUT, opitem->ot->idname, opitem->context, item->icon, (char*)item->name, x, y, w, h, NULL); + but= uiDefIconTextButO(block, BUT, opitem->ot->idname, opitem->context, item->icon, (char*)item->name, x, y, w, h, NULL); else if(item->icon) - uiDefIconButO(block, BUT, opitem->ot->idname, opitem->context, item->icon, x, y, w, h, NULL); + but= uiDefIconButO(block, BUT, opitem->ot->idname, opitem->context, item->icon, x, y, w, h, NULL); /* text only */ else - uiDefButO(block, BUT, opitem->ot->idname, opitem->context, (char*)item->name, x, y, w, h, NULL); + but= uiDefButO(block, BUT, opitem->ot->idname, opitem->context, (char*)item->name, x, y, w, h, NULL); + + if(but && opitem->properties) { + /* assign properties */ + PointerRNA *opptr= uiButGetOperatorPtrRNA(but); + opptr->data= opitem->properties; + opitem->properties= NULL; + } } else if(item->type == ITEM_MENU) { /* menu */ |