* src/GrampsDb/_GrampsDbBase.py (redo): Properly abort redo action

when no redo is available.


svn: r5778
This commit is contained in:
Alex Roitman 2006-01-17 19:43:23 +00:00
parent 7b1a104e2f
commit a01b665403
2 changed files with 7 additions and 3 deletions

View File

@ -1,3 +1,7 @@
2006-01-17 Alex Roitman <shura@gramps-project.org>
* src/GrampsDb/_GrampsDbBase.py (redo): Properly abort redo action
when no redo is available.
2006-01-17 Martin Hawlisch <Martin.Hawlisch@gmx.de>
* src/EventView.py (ui_definition): Add filter menu entry
* src/FamilyList.py (ui_definition): Add filter menu entry

View File

@ -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)