def go_back(*ignore): """Return the map view to where the user last set it.""" history = list(Gst.get('history')) lat, lon, zoom = history.pop() if valid_coords(lat, lon): MapView.set_zoom_level(zoom) MapView.center_on(lat, lon) if len(history) > 1: Gst.set_history(history) else: Gst.reset('history')
def teardown(): """Clean it all up.""" TrackFile.clear_all() for camera in Camera.instances: camera.photos.clear() for photo in list(Photograph.instances): photo.destroy() Photograph.cache.clear() modified.clear() selected.clear() Widgets.loaded_photos.clear() system('git checkout demo') for key in Gst.list_keys(): Gst.reset(key)