From f6e757a1b66e9519cea683846f7e1f946b87aeee Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Tue, 4 Jul 2006 04:59:15 +0000 Subject: [PATCH] * src/DataViews/_PlaceView.py: add attempt to map to google maps, check for valid list svn: r6985 --- gramps2/ChangeLog | 3 ++- gramps2/src/DataViews/_PlaceView.py | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 5c8a557ea..513ddca3a 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,5 +1,6 @@ 2006-07-03 Don Allingham - * src/DataViews/_PlaceView.py: add attempt to map to google maps + * src/DataViews/_PlaceView.py: add attempt to map to google maps, + check for valid list * src/glade/gramps.glade: fix date status button. 2006-07-02 Don Allingham diff --git a/gramps2/src/DataViews/_PlaceView.py b/gramps2/src/DataViews/_PlaceView.py index 350f7e7f8..87ca83aa0 100644 --- a/gramps2/src/DataViews/_PlaceView.py +++ b/gramps2/src/DataViews/_PlaceView.py @@ -103,8 +103,11 @@ class PlaceView(PageView.ListView): def google(self, obj): import GrampsDisplay - - place_handle = self.selected_handles()[0] + + try: + place_handle = self.selected_handles()[0] + except IndexError: + return place = self.dbstate.db.get_place_from_handle(place_handle) descr = place.get_title() longitude = place.get_longitude()