[Del] quick eraser: avoid conflict; record undo buffer
This commit is contained in:
parent
65d1c087d6
commit
f02459af87
1 changed files with 11 additions and 2 deletions
|
|
@ -5365,9 +5365,16 @@ static void mainloop(void)
|
||||||
}
|
}
|
||||||
else if (kbd_state[SDL_SCANCODE_DELETE] /* FIXME */)
|
else if (kbd_state[SDL_SCANCODE_DELETE] /* FIXME */)
|
||||||
{
|
{
|
||||||
/* Holding [Del] while clicking; switch to temp-mode eraser! */
|
/* Holding [Del] while clicking; switch to temp-mode eraser!
|
||||||
|
(as long as we're not involved in anything else within
|
||||||
|
this main loop!) */
|
||||||
|
|
||||||
|
if ((cur_tool != TOOL_SHAPES || shape_mode == SHAPE_TOOL_MODE_DONE) &&
|
||||||
|
(cur_tool != TOOL_STAMP || stamp_tool_mode == STAMP_TOOL_MODE_PLACE))
|
||||||
|
{
|
||||||
do_quick_eraser();
|
do_quick_eraser();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Draw something! */
|
/* Draw something! */
|
||||||
|
|
@ -24346,6 +24353,8 @@ static int do_quick_eraser(void) {
|
||||||
old_eraser = cur_eraser;
|
old_eraser = cur_eraser;
|
||||||
cur_eraser = NUM_ERASERS - 2; /* 2nd-smallest circle */
|
cur_eraser = NUM_ERASERS - 2; /* 2nd-smallest circle */
|
||||||
|
|
||||||
|
rec_undo_buffer();
|
||||||
|
|
||||||
done = 0;
|
done = 0;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue