diff options
author | Manuel Kaufmann <humitos@gmail.com> | 2012-05-29 01:59:41 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2012-08-10 13:49:31 (GMT) |
commit | e916f96740963b74fee773be21adc52c967ab05f (patch) | |
tree | 2f56ef2761be54f7d21b5085f376e5b1be0537e3 | |
parent | 0bddb49db8fca2d691042fe86eaa62992fe5b5c3 (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>
-rw-r--r-- | Area.py | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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: |