diff --git a/src/plugins/lib/maps/grampsmaps.py b/src/plugins/lib/maps/grampsmaps.py index ab73cf518..3c5134d0a 100644 --- a/src/plugins/lib/maps/grampsmaps.py +++ b/src/plugins/lib/maps/grampsmaps.py @@ -304,8 +304,10 @@ class osmGpsMap(): """ Is there a place at this position ? """ - found = False mark_selected = [] + if self.no_show_places_in_status_bar: + return mark_selected + found = False oldplace = "" for mark in self.places_found: # as we are not precise with our hand, reduce the precision diff --git a/src/plugins/view/geoevents.py b/src/plugins/view/geoevents.py index 9784d44c5..7ec686688 100644 --- a/src/plugins/view/geoevents.py +++ b/src/plugins/view/geoevents.py @@ -130,6 +130,7 @@ class GeoEvents(GeoGraphyView): self.sort = [] self.generic_filter = None self.additional_uis.append(self.additional_ui()) + self.no_show_places_in_status_bar = False def get_title(self): """ @@ -281,6 +282,7 @@ class GeoEvents(GeoGraphyView): longitude = "" self.without = 0 self.cal = config.get('preferences.calendar-format-report') + self.no_show_places_in_status_bar = False if self.generic_filter: events_list = self.generic_filter.apply(dbstate.db) @@ -299,6 +301,8 @@ class GeoEvents(GeoGraphyView): self.sort = sorted(self.place_list, key=operator.itemgetter(3, 4, 6) ) + if self.nbmarkers > 500 : # performance issue. Is it the good value ? + self.no_show_places_in_status_bar = True self._create_markers() def bubble_message(self, event, lat, lon, marks): diff --git a/src/plugins/view/geofamily.py b/src/plugins/view/geofamily.py index 4b36eba8f..72142bbd0 100644 --- a/src/plugins/view/geofamily.py +++ b/src/plugins/view/geofamily.py @@ -129,6 +129,7 @@ class GeoFamily(GeoGraphyView): self.nbmarkers = 0 self.sort = [] self.additional_uis.append(self.additional_ui()) + self.no_show_places_in_status_bar = False def get_title(self): """ diff --git a/src/plugins/view/geoperson.py b/src/plugins/view/geoperson.py index 28593d4a8..b51604f9f 100644 --- a/src/plugins/view/geoperson.py +++ b/src/plugins/view/geoperson.py @@ -157,6 +157,7 @@ class GeoPerson(GeoGraphyView): self.nbmarkers = 0 self.sort = [] self.additional_uis.append(self.additional_ui()) + self.no_show_places_in_status_bar = False def get_title(self): """ diff --git a/src/plugins/view/geoplaces.py b/src/plugins/view/geoplaces.py index 8d5839fb7..459380563 100644 --- a/src/plugins/view/geoplaces.py +++ b/src/plugins/view/geoplaces.py @@ -130,6 +130,7 @@ class GeoPlaces(GeoGraphyView): self.sort = [] self.generic_filter = None self.additional_uis.append(self.additional_ui()) + self.no_show_places_in_status_bar = False def get_title(self): """ @@ -239,6 +240,7 @@ class GeoPlaces(GeoGraphyView): self.minyear = 9999 self.maxyear = 0 self.without = 0 + self.no_show_places_in_status_bar = False latitude = "" longitude = "" # base "villes de france" : 38101 places : @@ -268,7 +270,11 @@ class GeoPlaces(GeoGraphyView): ) _LOG.debug("%s" % time.strftime(" end sort : " "%a %d %b %Y %H:%M:%S", time.gmtime())) + if self.nbmarkers > 500 : # performance issue. Is it the good value ? + self.no_show_places_in_status_bar = True self._create_markers() + _LOG.debug("%s" % time.strftime(" end create_markers : " + "%a %d %b %Y %H:%M:%S", time.gmtime())) def bubble_message(self, event, lat, lon, marks): menu = gtk.Menu()