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-05-29 01:59:41 (GMT)
committer Gonzalo Odiard <godiard@gmail.com>2012-08-10 13:49:31 (GMT)
commite916f96740963b74fee773be21adc52c967ab05f (patch)
tree2f56ef2761be54f7d21b5085f376e5b1be0537e3 /Area.py
parent0bddb49db8fca2d691042fe86eaa62992fe5b5c3 (diff)
Undo fixed SL #3105
Remove the obsolete "redos" when the user clicks many times on "undo" and after that draws anything again. I mean, it's in the middle of the "undo" list and start drawing again. Signed-off-by: Manuel Kaufmann <humitos@gmail.com>
Diffstat (limited to 'Area.py')
-rw-r--r--Area.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Area.py b/Area.py
index 20fab69..2ff35cc 100644
--- a/Area.py
+++ b/Area.py
@@ -891,6 +891,11 @@ class Area(Gtk.DrawingArea):
elif len(self._undo_list) == MAX_UNDO_STEPS:
# drop the oldest undo pix:
self._undo_list.pop(0)
+
+ # it could be at the middle of the list (clicked many
+ # times undo) and after that draw anything, so we should
+ # discart the next redos because they are obsolete now.
+ self._undo_list = self._undo_list[:self._undo_index]
else:
self._undo_index += 1
# Forget the redos after this one: