From a52da29fc89f6b746dedcc144aa8f437db4451f8 Mon Sep 17 00:00:00 2001 From: Martin Hawlisch Date: Mon, 16 Apr 2007 13:53:55 +0000 Subject: [PATCH] * src/ViewManager.py (create_pages): fix off-by-one error when preselecting last view svn: r8390 --- gramps2/ChangeLog | 4 ++++ gramps2/src/ViewManager.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index af9d6d63a..e5a3dc8bc 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,7 @@ +2007-04-16 Martin Hawlisch + * src/ViewManager.py (create_pages): fix off-by-one error when + preselecting last view + 2007-04-15 Don Allingham * po/gramps.pot: update for 2.2.7 preparation diff --git a/gramps2/src/ViewManager.py b/gramps2/src/ViewManager.py index 711ed2f10..b7a293100 100644 --- a/gramps2/src/ViewManager.py +++ b/gramps2/src/ViewManager.py @@ -780,7 +780,7 @@ class ViewManager: use_current = Config.get(Config.USE_LAST_VIEW) if use_current: current_page = Config.get(Config.LAST_VIEW) - if current_page > len(self.pages): + if current_page >= len(self.pages): current_page = 0 else: current_page = 0