Geography : add transient parent + change message
This commit is contained in:
parent
33b9e80028
commit
4a47edc39c
@ -306,7 +306,7 @@ class GeoPerson(GeoGraphyView):
|
||||
self.message_layer.clear_messages()
|
||||
self.kml_layer.clear()
|
||||
person_handle = self.uistate.get_active('Person')
|
||||
person = dbstate.db.get_person_from_handle(person_handle)
|
||||
person = dbstate.db.get_person_from_handle(person_handle) if person_handle else None
|
||||
if person is not None:
|
||||
# For each event, if we have a place, set a marker.
|
||||
self.load_kml_files(person)
|
||||
|
@ -266,9 +266,10 @@ class GeoPlaces(GeoGraphyView):
|
||||
places_handle = dbstate.db.get_place_handles()
|
||||
except:
|
||||
return
|
||||
progress = ProgressMeter(self.window_name, can_cancel=False)
|
||||
progress = ProgressMeter(self.window_name, can_cancel=False,
|
||||
parent=self.uistate.window)
|
||||
length = len(places_handle)
|
||||
progress.set_pass(_('Selecting all places markers'), length)
|
||||
progress.set_pass(_('Selecting all places'), length)
|
||||
for place_hdl in places_handle:
|
||||
place = dbstate.db.get_place_from_handle(place_hdl)
|
||||
self._create_one_place(place)
|
||||
@ -276,9 +277,10 @@ class GeoPlaces(GeoGraphyView):
|
||||
progress.close()
|
||||
elif self.generic_filter:
|
||||
place_list = self.generic_filter.apply(dbstate.db)
|
||||
progress = ProgressMeter(self.window_name, can_cancel=False)
|
||||
progress = ProgressMeter(self.window_name, can_cancel=False,
|
||||
parent=self.uistate.window)
|
||||
length = len(place_list)
|
||||
progress.set_pass(_('Selecting all places markers'), length)
|
||||
progress.set_pass(_('Selecting all places'), length)
|
||||
for place_handle in place_list:
|
||||
place = dbstate.db.get_place_from_handle(place_handle)
|
||||
self._create_one_place(place)
|
||||
|
Loading…
Reference in New Issue
Block a user