Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPootle daemon <pootle@pootle.sugarlabs.org>2012-06-08 04:34:13 (GMT)
committer Pootle daemon <pootle@pootle.sugarlabs.org>2012-06-08 04:34:13 (GMT)
commitc83f0e51fd7f90518e50bc08f0ab5e81d275e4c0 (patch)
treea6a56b63bf979c88572a4dcdc9b88d88ae968dc5
parent1ada4931e893cf576d4e2b4b0ce6aef4e4458324 (diff)
parent422863a0ad64b9fedf8f6ccb664e35718f5d1dea (diff)
Merge branch 'master' of git.sugarlabs.org:paint/mainline
-rw-r--r--Area.py8
-rw-r--r--toolbox.py2
2 files changed, 8 insertions, 2 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')
diff --git a/toolbox.py b/toolbox.py
index dcdfeb0..8d58306 100644
--- a/toolbox.py
+++ b/toolbox.py
@@ -352,7 +352,7 @@ class ToolsToolbarBuilder():
# Check if there is an area selected or if the "stamp" tool is
# being used
sensitive = self._activity.area.is_selected() or \
- self.tool['name'] == 'stamp'
+ self.properties['name'] == 'stamp'
self._tool_stamp.set_sensitive(sensitive)