Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorperepujal <perepujal>2011-05-21 06:20:32 (GMT)
committer perepujal <perepujal>2011-05-21 06:20:32 (GMT)
commit4e681e6895809763e6f8ea99c2eb6fd3e835cc64 (patch)
treee8df9f5d01c65c857ddedc8721540ea512533442
parent086042316cc772a38b9b80b7f29ed7385b97621e (diff)
tweaking undo in mouse accessibility mode.
-rw-r--r--src/tuxpaint.c10
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);