From 15c3a466e53eb0fae9af996ebf5439ee35c4a7fd Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 20 Feb 2014 21:13:09 +0530 Subject: [PATCH] Edit book: Fix an error that occurs if more than 100 checkpoints are created. Fixes #1282583 [book editor error when adding 100 items](https://bugs.launchpad.net/calibre/+bug/1282583) --- src/calibre/gui2/tweak_book/undo.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/calibre/gui2/tweak_book/undo.py b/src/calibre/gui2/tweak_book/undo.py index 5a81aa0e57..f568b30850 100644 --- a/src/calibre/gui2/tweak_book/undo.py +++ b/src/calibre/gui2/tweak_book/undo.py @@ -108,6 +108,7 @@ class GlobalUndoHistory(QAbstractListModel): self.beginRemoveRows(ROOT, 0, num - 1) cleanup(self.states[:num]) self.states = self.states[num:] + self.pos -= num self.endRemoveRows() def rewind_savepoint(self):