From f5e4e4eb0f29909f6676e78793f737fd49a684bc Mon Sep 17 00:00:00 2001 From: Pere Pujal i Carabantes Date: Mon, 9 Nov 2009 21:51:45 +0000 Subject: [PATCH] Fixing a bug that caused the deletion of a label when a)writing the label b) draw things that caused that cur_undo matched newly label->save_undoid after cycling around NUM_UNDO_BUFS c)click on undo. --- src/tuxpaint.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/tuxpaint.c b/src/tuxpaint.c index 1e83be0f1..f7c831b25 100644 --- a/src/tuxpaint.c +++ b/src/tuxpaint.c @@ -18304,7 +18304,11 @@ void rec_undo_label(void) have_to_rec_label_node = FALSE; } else - text_undo[cur_undo] = 0; + { + text_undo[cur_undo] = 0; + if (current_label_node != NULL && current_label_node->save_undoid == (cur_undo + 1) % NUM_UNDO_BUFS) + current_label_node->save_undoid = 255; + } } void do_undo_label_node()