mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Make quickview survive changing the library.
This commit is contained in:
parent
2930304cd8
commit
7f1905b779
@ -38,3 +38,6 @@ class ShowQuickviewAction(InterfaceAction):
|
||||
Quickview(self.gui, self.gui.library_view, index)
|
||||
self.current_instance.show()
|
||||
|
||||
def library_changed(self, db):
|
||||
if self.current_instance and not self.current_instance.is_closed:
|
||||
self.current_instance.set_database(db)
|
||||
|
@ -108,6 +108,15 @@ class Quickview(QDialog, Ui_Quickview):
|
||||
self.search_button.clicked.connect(self.do_search)
|
||||
view.model().new_bookdisplay_data.connect(self.book_was_changed)
|
||||
|
||||
def set_database(self, db):
|
||||
self.db = db
|
||||
self.items.blockSignals(True)
|
||||
self.books_table.blockSignals(True)
|
||||
self.items.clear()
|
||||
self.books_table.setRowCount(0)
|
||||
self.books_table.blockSignals(False)
|
||||
self.items.blockSignals(False)
|
||||
|
||||
# search button
|
||||
def do_search(self):
|
||||
if self.last_search is not None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user