'set_to: if None, advance the state. Otherwise must be one of the values
in TAG_SEARCH_STATES'

def _toggle(self, index, set_to):

    modifiers = int(QApplication.keyboardModifiers())
    exclusive = (modifiers not in (Qt.CTRL, Qt.SHIFT))
    if self._model.toggle(index, exclusive, set_to=set_to):
        self.tags_marked.emit(self.search_string)
