From cb3d94f8160036e3f93466eaa41965a9f20011f6 Mon Sep 17 00:00:00 2001 From: Serge Noiraud Date: Tue, 25 Sep 2012 17:07:53 +0000 Subject: [PATCH] Geography : better place selection if we have a place history. #05742 note 25518 svn: r20448 --- src/plugins/lib/maps/geography.py | 4 ++++ src/plugins/view/geoplaces.py | 11 +++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/plugins/lib/maps/geography.py b/src/plugins/lib/maps/geography.py index 380bbf418..53b5340f1 100644 --- a/src/plugins/lib/maps/geography.py +++ b/src/plugins/lib/maps/geography.py @@ -811,7 +811,11 @@ class GeoGraphyView(OsmGps, NavigationView): """ Link an existing place using longitude and latitude of location centered on the map + If we have a place history, we must show all places to avoid an empty + place selection in the PlaceSelection. """ + if self.uistate.get_active('Place'): + self._createmap(None) selector = SelectPlace(self.dbstate, self.uistate, []) place = selector.run() if place: diff --git a/src/plugins/view/geoplaces.py b/src/plugins/view/geoplaces.py index f8a0b9a79..05ba42ca9 100644 --- a/src/plugins/view/geoplaces.py +++ b/src/plugins/view/geoplaces.py @@ -187,12 +187,11 @@ class GeoPlaces(GeoGraphyView): all handling of visibility is now in rebuild_trees, see that for more information. """ - #active = self.uistate.get_active('Place') - #if active: - # self._createmap(active) - #else: - # self._createmap(None) - self._createmap(None) + active = self.uistate.get_active('Place') + if active: + self._createmap(active) + else: + self._createmap(None) def _create_one_place(self,place): """