From ab0dfc8d680b0d9d9b9ee7fc7d6d51d0b67c4f29 Mon Sep 17 00:00:00 2001 From: SNoiraud Date: Tue, 17 Mar 2015 21:16:26 +0100 Subject: [PATCH] geography: bug 8450: Attempting to add a bookmark causes an error. --- gramps/plugins/lib/maps/geography.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/gramps/plugins/lib/maps/geography.py b/gramps/plugins/lib/maps/geography.py index d3b131a50..587326d65 100644 --- a/gramps/plugins/lib/maps/geography.py +++ b/gramps/plugins/lib/maps/geography.py @@ -181,11 +181,10 @@ class GeoGraphyView(OsmGps, NavigationView): self.geo_othermap[ident] = cairo.ImageSurface.create_from_png(fh) #self.geo_othermap[ident] = cairo.ImageSurface.create_from_png(path) - def add_bookmark(self, menu, handle): - if handle: - self.uistate.set_active(handle, self.navigation_type()) - self.bookmarks.add(handle) - self.bookmarks.redraw() + def add_bookmark(self, menu): + mlist = self.selected_handles() + if mlist: + self.bookmarks.add(mlist[0]) else: from gramps.gui.dialog import WarningDialog WarningDialog(