Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Area.py
diff options
context:
space:
mode:
authorManuel Kaufmann <humitos@gmail.com>2012-06-01 22:29:11 (GMT)
committer Manuel QuiƱones <manuq@laptop.org>2012-06-07 18:11:16 (GMT)
commit422863a0ad64b9fedf8f6ccb664e35718f5d1dea (patch)
treeb41a55b988345fd811ae449a16f1a61573e939c2 /Area.py
parent0a76f9b0ccd642cd741796b733c75afea5a0d6a7 (diff)
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> Acked-by: Manuel QuiƱones <manuq@laptop.org>
Diffstat (limited to 'Area.py')
-rw-r--r--Area.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/Area.py b/Area.py
index d8997a1..a81cda3 100644
--- a/Area.py
+++ b/Area.py
@@ -663,13 +663,18 @@ class Area(gtk.DrawingArea):
widget.queue_draw()
self.drawing = False
self.desenha = False
- if not private_undo:
+ if not private_undo and self.tool['name'] != 'bucket':
+ # We have to avoid saving an undo state if the bucket tool
+ # is selected because this undo state is called before the
+ # gobject.idle_add (with the fill_flood function) finishes
+ # and an unconsistent undo state is saved
self.enableUndo(widget)
def fast_flood_fill(self, widget, x, y, width, height):
fill(self.pixmap, self.gc, x, y, width,
height, self.gc_line.foreground.pixel)
widget.queue_draw()
+ self.enableUndo(widget)
display = gtk.gdk.display_get_default()
cursor = gtk.gdk.cursor_new_from_name(display, 'paint-bucket')
self.window.set_cursor(cursor)
@@ -709,6 +714,7 @@ class Area(gtk.DrawingArea):
self.pixmap.draw_image(self.gc, gdk_image, 0, 0, 0, 0, width, height)
self.queue_draw()
+ self.enableUndo(self)
display = gtk.gdk.display_get_default()
cursor = gtk.gdk.cursor_new_from_name(display, 'paint-bucket')