diff options
Diffstat (limited to 'source/blender/editors/interface/interface.c')
-rw-r--r-- | source/blender/editors/interface/interface.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 57f45059865..e937ab0c50a 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -559,7 +559,7 @@ void uiEndBlock(const bContext *C, uiBlock *block) } /* handle pending stuff */ - if(block->layout) uiBlockLayoutResolve(C, block, NULL, NULL); + if(block->layouts.first) uiBlockLayoutResolve(C, block, NULL, NULL); ui_block_do_align(block); if(block->flag & UI_BLOCK_LOOP) ui_menu_block_set_keymaps(C, block); @@ -1984,6 +1984,11 @@ void uiBlockEndAlign(uiBlock *block) block->flag &= ~UI_BUT_ALIGN; // all 4 flags } +int ui_but_can_align(uiBut *but) +{ + return !ELEM(but->type, LABEL, ROUNDBOX); +} + static void ui_block_do_align_but(uiBlock *block, uiBut *first, int nr) { uiBut *prev, *but=NULL, *next; @@ -2176,7 +2181,7 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, char *str, short but->aspect= 1.0f; //XXX block->aspect; but->block= block; // pointer back, used for frontbuffer status, and picker - if(block->flag & UI_BUT_ALIGN) + if((block->flag & UI_BUT_ALIGN) && ui_but_can_align(but)) but->alignnr= block->alignnr; but->func= block->func; |