diff options
author | Manuel Kaufmann <humitos@gmail.com> | 2012-05-29 01:59:41 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2012-08-08 13:33:20 (GMT) |
commit | dc57156486a7cd415edf260387225c2474713232 (patch) | |
tree | b2086e97b80ff546f4318ab640d9b557529d9742 | |
parent | 22833fca9f6fb75d0b0ad40602ad5a219c41cdb7 (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: |