Ticket #3105: 0001-Undo-after-using-bucket-tool-fixed-SL-3105.patch

File 0001-Undo-after-using-bucket-tool-fixed-SL-3105.patch, 1.8 KB (added by humitos, 9 years ago)

This patch solves this issue

  • Area.py

    From f5e3c36436e974b3b0de7f9810472d719fcf12e1 Mon Sep 17 00:00:00 2001
    Message-Id: <f5e3c36436e974b3b0de7f9810472d719fcf12e1.1338589740.git.humitos@gmail.com>
    From: Manuel Kaufmann <humitos@gmail.com>
    Date: Fri, 1 Jun 2012 19:27:28 -0300
    Subject: [PATCH Paint] Undo after using bucket tool fixed SL #3105
    
    Fixed the ability to go back and forward through the undo list after using many
    times the bucket tool.
    
    Signed-off-by: Manuel Kaufmann <humitos@gmail.com>
    ---
     Area.py |    8 +++++++-
     1 file changed, 7 insertions(+), 1 deletion(-)
    
    diff --git a/Area.py b/Area.py
    index d8997a1..a81cda3 100644
    a b class Area(gtk.DrawingArea): 
    663663            widget.queue_draw()
    664664            self.drawing = False
    665665        self.desenha = False
    666         if not private_undo:
     666        if not private_undo and self.tool['name'] != 'bucket':
     667            # We have to avoid saving an undo state if the bucket tool
     668            # is selected because this undo state is called before the
     669            # gobject.idle_add (with the fill_flood function) finishes
     670            # and an unconsistent undo state is saved
    667671            self.enableUndo(widget)
    668672
    669673    def fast_flood_fill(self, widget, x, y, width, height):
    670674        fill(self.pixmap, self.gc, x, y, width,
    671675                height, self.gc_line.foreground.pixel)
    672676        widget.queue_draw()
     677        self.enableUndo(widget)
    673678        display = gtk.gdk.display_get_default()
    674679        cursor = gtk.gdk.cursor_new_from_name(display, 'paint-bucket')
    675680        self.window.set_cursor(cursor)
    class Area(gtk.DrawingArea): 
    709714
    710715        self.pixmap.draw_image(self.gc, gdk_image, 0, 0, 0, 0, width, height)
    711716        self.queue_draw()
     717        self.enableUndo(self)
    712718
    713719        display = gtk.gdk.display_get_default()
    714720        cursor = gtk.gdk.cursor_new_from_name(display, 'paint-bucket')