diff options
author | Gonzalo Odiard <godiard@gmail.com> | 2011-06-24 17:54:26 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2011-06-24 17:54:26 (GMT) |
commit | 218b8847318a3d3ac5dfd03a38598b27fe315d01 (patch) | |
tree | ad904948c9bea851a46eb417eb99b3e43b84c081 /Desenho.py | |
parent | c6c0f3a3236ec2b3eb79510552d61b7da8313919 (diff) |
Fixes to undo/redo
Signed-by-off: Manuel QuiƱones <manuq@laptop.org>
Signed-by-off: Gonzalo Odiard <gonzalo@laptop.org>
Diffstat (limited to 'Desenho.py')
-rw-r--r-- | Desenho.py | 14 |
1 files changed, 5 insertions, 9 deletions
@@ -791,7 +791,7 @@ class Desenho: widget.oldx, widget.oldy, coords[0], coords[1]) widget.first = widget.oldx, widget.oldy widget.points = [widget.first, coords] - widget.enableUndo(widget) + widget.enableUndo(widget, overrite=True) widget.last = coords else: # param == "release" # first release @@ -805,7 +805,7 @@ class Desenho: widget.points = [widget.first, coords] widget.pixmap.draw_line(widget.gc_line, widget.oldx, widget.oldy, coords[0], coords[1]) - widget.enableUndo(widget) + widget.enableUndo(widget, overrite=True) widget.last = coords widget.polygon_start = False else: @@ -815,7 +815,7 @@ class Desenho: widget.last[0], widget.last[1], coords[0], coords[1]) widget.pixmap.draw_line(widget.gc_line, widget.last[0], widget.last[1], coords[0], coords[1]) - widget.enableUndo(widget) + widget.enableUndo(widget, overrite=True) widget.last = coords widget.points.append(coords) elif param == "release": @@ -835,9 +835,7 @@ class Desenho: pixmap.draw_polygon(widget.gc_line, False, tp) widget.last = [] widget.polygon_start = True - #destroy the undo screen of polygon start - widget.undo_times -= 1 - widget.enableUndo(widget) + widget.enableUndo(widget, overrite=True) elif param == "bug": tp = tuple(widget.points) if fill == True: @@ -845,9 +843,7 @@ class Desenho: pixmap.draw_polygon(widget.gc_line, False, tp) widget.last = [] widget.polygon_start = True - #destroy the undo screen of polygon start - widget.undo_times -= 1 - widget.enableUndo(widget) + widget.enableUndo(widget, overrite=True) widget.queue_draw() def adjust(self, widget, coords, locked=False): |