From fd2d95fcc210cb6e0e95b78ab3cd65041a1038ee Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Tue, 17 Jan 2006 19:43:23 +0000 Subject: [PATCH] * src/GrampsDb/_GrampsDbBase.py (redo): Properly abort redo action when no redo is available. svn: r5778 --- ChangeLog | 4 ++++ src/GrampsDb/_GrampsDbBase.py | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7545c2ee3..d78ea7905 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-01-17 Alex Roitman + * src/GrampsDb/_GrampsDbBase.py (redo): Properly abort redo action + when no redo is available. + 2006-01-17 Martin Hawlisch * src/EventView.py (ui_definition): Add filter menu entry * src/FamilyList.py (ui_definition): Add filter menu entry diff --git a/src/GrampsDb/_GrampsDbBase.py b/src/GrampsDb/_GrampsDbBase.py index 39285e7a0..f3c96f9f4 100644 --- a/src/GrampsDb/_GrampsDbBase.py +++ b/src/GrampsDb/_GrampsDbBase.py @@ -1209,14 +1209,14 @@ class GrampsDbBase(GrampsDBCallback): Accesses the last undone transaction, and reverts the data to the state before the transaction was undone. """ - if self.undoindex == _UNDO_SIZE or self.readonly: + if self.undoindex >= _UNDO_SIZE or self.readonly: return False - self.undoindex +=1 - transaction = self.translist[self.undoindex] + transaction = self.translist[self.undoindex+1] if transaction == None: return False + self.undoindex +=1 mapbase = (self.person_map, self.family_map, self.source_map, self.event_map, self.media_map, self.place_map)