If the search option highlight_only is set, then only select a book after a search if the search returned results.

This commit is contained in:
Charles Haley 2011-04-17 13:36:02 +01:00
parent 375d64e118
commit f49d96871b

View File

@ -743,6 +743,8 @@ class BooksView(QTableView): # {{{
id_to_select = self._model.get_current_highlighted_id() id_to_select = self._model.get_current_highlighted_id()
if id_to_select is not None: if id_to_select is not None:
self.select_rows([id_to_select], using_ids=True) self.select_rows([id_to_select], using_ids=True)
elif self._model.highlight_only:
self.clearSelection()
self.setFocus(Qt.OtherFocusReason) self.setFocus(Qt.OtherFocusReason)
def connect_to_search_box(self, sb, search_done): def connect_to_search_box(self, sb, search_done):