def delete_row(self):
        """Delete bookmarks or event from annotations, based on row."""
        sel_model = self.idx_annot_list.selectionModel()
        for row in sel_model.selectedRows():
            i = row.row()
            start = self.idx_annot_list.property('start')[i]
            end = self.idx_annot_list.property('end')[i]
            name = self.idx_annot_list.item(i, 2).text()
            marker_event = self.idx_annot_list.item(i, 3).text()
            if marker_event == 'bookmark':
                self.annot.remove_bookmark(name=name, time=(start, end))
            else:
                self.annot.remove_event(name=name, time=(start, end))
                highlight = self.parent.traces.highlight
                if highlight:
                    self.parent.traces.scene.removeItem(highlight)
                    highlight = None
                    self.parent.traces.event_sel = None

        self.update_annotations()
Delete bookmarks or event from annotations, based on row.