mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix error generated when changing libraries with the quickview window open
This commit is contained in:
commit
6db4717ef1
@ -134,7 +134,16 @@ class Quickview(QDialog, Ui_Quickview):
|
||||
def book_was_changed(self, mi):
|
||||
if self.is_closed or self.current_column is None:
|
||||
return
|
||||
# There is an ordering problem when libraries are changed. The library
|
||||
# view is changed, triggering a book_was_changed signal. Unfortunately
|
||||
# this happens before the library_changed actions are run, meaning we
|
||||
# still have the old database. To avoid the problem we just ignore the
|
||||
# operation if we get an exception. The set_database will come
|
||||
# eventually.
|
||||
try:
|
||||
self.refresh(self.view.model().index(self.db.row(mi.id), self.current_column))
|
||||
except:
|
||||
pass
|
||||
|
||||
# clicks on the items listWidget
|
||||
def item_selected(self, txt):
|
||||
|
Loading…
x
Reference in New Issue
Block a user