On large changes of the Lattice resolution button, the undopush crashed.
Reason was that the push happened for buttons before the actual event for
buttons was executed.
Solved by creating new event UNDOPUSH that's being added to the queue by
by buttons now.

- Made button undo texts for number buttons more clear
- Added undo push for missing Add lamp/empty/lattice/camera
This commit is contained in:
2004-11-22 22:41:07 +00:00
parent 0d9fa74348
commit f3c8c47adb
5 changed files with 25 additions and 6 deletions

View File

@@ -3342,10 +3342,10 @@ static int ui_do_block(uiBlock *block, uiEvent *uevent)
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 ELEM(but->type, LINK, INLINK) screen_delayed_undo_push("Add button link");
else if ELEM(but->type, MENU, ICONTEXTROW) screen_delayed_undo_push(but->drawstr);
else if(but->drawstr[0]) screen_delayed_undo_push(but->drawstr);
else screen_delayed_undo_push(but->tip);
}
}
}