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
This commit is contained in:
2004-11-07 16:49:46 +00:00
parent c702b237d5
commit 0f84375d7a
18 changed files with 202 additions and 72 deletions

View File

@@ -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);