diff options
author | perepujal <perepujal> | 2011-05-21 06:20:32 (GMT) |
---|---|---|
committer | perepujal <perepujal> | 2011-05-21 06:20:32 (GMT) |
commit | 4e681e6895809763e6f8ea99c2eb6fd3e835cc64 (patch) | |
tree | e8df9f5d01c65c857ddedc8721540ea512533442 | |
parent | 086042316cc772a38b9b80b7f29ed7385b97621e (diff) |
tweaking undo in mouse accessibility mode.
-rw-r--r-- | src/tuxpaint.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/tuxpaint.c b/src/tuxpaint.c index 6e127bc..f1e7aa1 100644 --- a/src/tuxpaint.c +++ b/src/tuxpaint.c @@ -4278,6 +4278,10 @@ static void mainloop(void) if(shape_tool_mode != SHAPE_TOOL_MODE_DONE) { shape_tool_mode = SHAPE_TOOL_MODE_DONE; + do_undo(); + tool_avail[TOOL_REDO] = 0; /* Don't let them 'redo' to get preview back */ + draw_toolbar(); + update_screen_rect(&r_tools); update_canvas(0, 0, canvas->w, canvas->h); } @@ -4416,7 +4420,8 @@ static void mainloop(void) if (cur_tool == TOOL_BRUSH) { /* Start painting! */ - rec_undo_buffer(); + if(!emulate_button_pressed) + rec_undo_buffer(); /* (Arbitrarily large, so we draw once now) */ reset_brush_counter(); @@ -4571,7 +4576,8 @@ static void mainloop(void) else if (cur_tool == TOOL_ERASER) { /* Erase! */ - rec_undo_buffer(); + if (!emulate_button_pressed) + rec_undo_buffer(); do_eraser(old_x, old_y); |