Quickview: fix regression that broke the "Lock quickview" checkbox.

This commit is contained in:
Charles Haley 2017-07-30 10:31:57 +02:00
parent 8d79f568e1
commit a25013945a
3 changed files with 11 additions and 4 deletions

View File

@ -350,7 +350,7 @@ class EditMetadataAction(InterfaceAction):
self.gui.tags_view.recount_with_position_based_index()
qv = get_quickview_action_plugin()
if qv:
qv.refill_quickview()
qv.refresh_quickview(current)
def do_edit_metadata(self, row_list, current_row, editing_multiple):
from calibre.gui2.metadata.single import edit_metadata

View File

@ -149,11 +149,18 @@ class ShowQuickviewAction(InterfaceAction):
def refill_quickview(self):
'''
Called when the data or the columns shown in the QV pane might have changed.
Called when the columns shown in the QV pane might have changed.
'''
if self.current_instance and not self.current_instance.is_closed:
self.current_instance.refill()
def refresh_quickview(self, idx):
'''
Called when the data shown in the QV pane might have changed.
'''
if self.current_instance and not self.current_instance.is_closed:
self.current_instance.refresh(idx)
def change_quickview_column(self, idx):
'''
Called from the column header context menu to change the QV query column

View File

@ -267,7 +267,7 @@ class Quickview(QDialog, Ui_Quickview):
def refill(self):
'''
Refill the table in case the book data changes
Refill the table in case the columns displayed changes
'''
self.add_columns_to_widget()
self._refresh(self.current_book_id, self.current_key)
@ -371,7 +371,7 @@ class Quickview(QDialog, Ui_Quickview):
# operation if we get an exception. The "close" will come
# eventually.
try:
self._refresh(mi.get('id'), self.current_key)
self.refresh(self.view.model().index(self.db.row(mi.id), self.current_column))
except:
pass