def update_highlights(selection): """Ensure only the selected labels are highlighted.""" selection_exists = selection.count_selected_rows() > 0 selected.clear() for photo in photos.values(): # Maintain the 'selected' set() for easier iterating later. if selection.iter_is_selected(photo.iter): selected.add(photo) photo.set_label_highlight(photo in selected, selection_exists)
def update_highlights(self, selection): """Ensure only the selected labels are highlighted.""" selection_exists = selection.count_selected_rows() > 0 selected.clear() for label in MarkerLayer.get_markers(): photo = label.photo itr = photo.iter if itr and selection.iter_is_selected(itr): selected.add(photo) label.set_highlight(photo in selected, selection_exists)
def tearDown(self): """Undo whatever mess the testsuite created.""" clear_all_gpx() for camera in known_cameras.values(): camera.photos.clear() for photo in photos.values(): gui.labels.layer.remove_marker(photo.label) photos.clear() modified.clear() selected.clear() gui.liststore.clear() system('git checkout demo') for key in app.gst.list_keys(): app.gst.reset(key)