Allow using Quick view from the Book grid view. Fixes #1869550 [[Enhancement] Use Quickview in other views](https://bugs.launchpad.net/calibre/+bug/1869550)

Merge branch 'master' of https://github.com/cbhaley/calibre
This commit is contained in:
Kovid Goyal 2020-03-29 16:10:24 +05:30
commit 8e7b8d9ca4
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -425,7 +425,11 @@ class Quickview(QDialog, Ui_Quickview):
try: try:
bv_row = idx.row() bv_row = idx.row()
self.current_column = idx.column() from calibre.gui2.ui import get_gui
view = get_gui().library_view.alternate_views.current_view.__class__.__name__
self.current_column = (
self.view.column_map.index('authors') if view == 'GridView'
else idx.column())
key = self.view.column_map[self.current_column] key = self.view.column_map[self.current_column]
book_id = self.view.model().id(bv_row) book_id = self.view.model().id(bv_row)
if self.current_book_id == book_id and self.current_key == key: if self.current_book_id == book_id and self.current_key == key: