Geography : force to redraw the layers when we change the map provider.

svn: r19386
This commit is contained in:
Serge Noiraud 2012-04-25 07:17:04 +00:00
parent 2cd6b8a50a
commit 8260f30b94
5 changed files with 9 additions and 13 deletions

View File

@ -148,6 +148,7 @@ class OsmGps():
self.osm.connect('changed', self.zoom_changed)
self.osm.show()
self.vbox.pack_start(self.osm)
self.goto_handle(handle=None)
def add_selection_layer(self):
"""

View File

@ -174,10 +174,7 @@ class GeoEvents(GeoGraphyView):
"""
Rebuild the tree with the given events handle as the root.
"""
if handle:
self.change_active(handle)
self._createmap(handle)
self.uistate.modify_statusbar(self.dbstate)
self.build_tree()
def show_all_events(self, menu, event, lat, lon):
"""
@ -289,7 +286,7 @@ class GeoEvents(GeoGraphyView):
self._createmap_for_one_event(event)
else:
if obj is None:
events_handle = dbstate.db.iter_event_handles()
events_handle = dbstate.db.get_event_handles()
for event_hdl in events_handle:
event = dbstate.db.get_event_from_handle(event_hdl)
self._createmap_for_one_event(event)

View File

@ -173,10 +173,7 @@ class GeoFamily(GeoGraphyView):
"""
Rebuild the tree with the given person handle as the root.
"""
if handle:
self.change_active(handle)
self._createmap(handle)
self.uistate.modify_statusbar(self.dbstate)
self.build_tree()
def build_tree(self):
"""

View File

@ -204,6 +204,10 @@ class GeoPerson(GeoGraphyView):
if handle:
self.change_active(handle)
self._createmap(handle)
active = self.get_active()
if active:
p1 = self.dbstate.db.get_person_from_handle(active)
self._createmap(p1)
self.uistate.modify_statusbar(self.dbstate)
def build_tree(self):

View File

@ -174,10 +174,7 @@ class GeoPlaces(GeoGraphyView):
"""
Rebuild the tree with the given places handle as the root.
"""
if handle:
self.change_active(handle)
self._createmap(handle)
self.uistate.modify_statusbar(self.dbstate)
self.build_tree()
def show_all_places(self, menu, event, lat, lon):
"""