diff options
author | Ton Roosendaal <ton@blender.org> | 2004-11-07 19:49:46 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2004-11-07 19:49:46 +0300 |
commit | 0f84375d7afeccdaeb7a84af16aa46b1a521286f (patch) | |
tree | a5a1e1eafe4fd50f87114896b7e441113b237fe2 /source/blender/src/interface.c | |
parent | c702b237d5f9a542c1d327e1c87a5b7e7ec81590 (diff) |
Lotsa undo stuff added;
- ALT+U undo menu shows history for global undo as well
- Added undo pushes for buttons window more consistantly
- Added it & tested for ipowindow too
- Added it in outliner
- And quite some missing occasions for 3d window editing
Diffstat (limited to 'source/blender/src/interface.c')
-rw-r--r-- | source/blender/src/interface.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/source/blender/src/interface.c b/source/blender/src/interface.c index ede18300a8d..c6397ae2f8b 100644 --- a/source/blender/src/interface.c +++ b/source/blender/src/interface.c @@ -3250,10 +3250,19 @@ static int ui_do_block(uiBlock *block, uiEvent *uevent) if(inside || uevent->event!=LEFTMOUSE) { butevent= ui_do_button(block, but, uevent); - if( !(block->flag & UI_BLOCK_LOOP)) - if(but->type!=BLOCK && but->type!=MENU) - if(!G.obedit) - BIF_undo_push(but->str); + /* add undo pushes if... */ + if( !(block->flag & UI_BLOCK_LOOP)) { + if(!G.obedit) { + if ELEM4(but->type, BLOCK, BUT, LABEL, PULLDOWN); + else { + /* define which string to use for undo */ + if ELEM(but->type, LINK, INLINK) BIF_undo_push("Add button link"); + else if ELEM(but->type, MENU, ICONTEXTROW) BIF_undo_push(but->drawstr); + else if(but->str[0]) BIF_undo_push(but->str); + else BIF_undo_push(but->tip); + } + } + } if(butevent) addqueue(block->winq, UI_BUT_EVENT, (short)butevent); |