diff options
author | Ton Roosendaal <ton@blender.org> | 2009-02-17 18:53:52 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-02-17 18:53:52 +0300 |
commit | 9322bddf2c8997adafe3474e50bbb2eab7ab2076 (patch) | |
tree | dcb59d85488efc58d745c9b124bf44a8264526b1 /source/blender/editors/interface/interface.c | |
parent | 9185f7931aba220c0b8ac82878e869225f2549dd (diff) |
2.5
Fix for the 'repeat last operator' option. It didn't work yet well
outside editmode. Now undo/redo has to fully keep the UI alive,
even when called from within a running popup.
Another fix: when regions collapse/hide they were not effectively
disabled, still accepting events. (like Nkey in 3d window).
Diffstat (limited to 'source/blender/editors/interface/interface.c')
-rw-r--r-- | source/blender/editors/interface/interface.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 66d9653bdd0..f6a5086773a 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -1494,6 +1494,7 @@ static void ui_free_link(uiLink *link) } } +/* can be called with C==NULL */ static void ui_free_but(const bContext *C, uiBut *but) { if(but->opptr) { @@ -1501,13 +1502,21 @@ static void ui_free_but(const bContext *C, uiBut *but) MEM_freeN(but->opptr); } if(but->func_argN) MEM_freeN(but->func_argN); - if(but->active) ui_button_active_cancel(C, but); + if(but->active) { + /* XXX solve later, buttons should be free-able without context? */ + if(C) + ui_button_active_cancel(C, but); + else + if(but->active) + MEM_freeN(but->active); + } if(but->str && but->str != but->strdata) MEM_freeN(but->str); ui_free_link(but->link); MEM_freeN(but); } +/* can be called with C==NULL */ void uiFreeBlock(const bContext *C, uiBlock *block) { uiBut *but; @@ -1525,6 +1534,7 @@ void uiFreeBlock(const bContext *C, uiBlock *block) MEM_freeN(block); } +/* can be called with C==NULL */ void uiFreeBlocks(const bContext *C, ListBase *lb) { uiBlock *block; |