Fix calibre startup crash caused by Quickview when the applied virtual library is empty (has no books).

This commit is contained in:
Charles Haley 2017-07-07 18:58:18 +02:00
parent 25d3168df5
commit e2f905a8af

View File

@ -356,6 +356,7 @@ class Quickview(QDialog, Ui_Quickview):
if self.lock_qv.isChecked(): if self.lock_qv.isChecked():
return return
try:
bv_row = idx.row() bv_row = idx.row()
self.current_column = idx.column() self.current_column = idx.column()
key = self.view.column_map[self.current_column] key = self.view.column_map[self.current_column]
@ -363,6 +364,8 @@ class Quickview(QDialog, Ui_Quickview):
if self.current_book_id == book_id and self.current_key == key: if self.current_book_id == book_id and self.current_key == key:
return return
self._refresh(book_id, key) self._refresh(book_id, key)
except:
self.indicate_no_items()
def _refresh(self, book_id, key): def _refresh(self, book_id, key):
''' '''