mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
Fix misuse of isSectionIndex() in visible_columns. isSectionIndex() takes a logical index but a visual index was being given. The misuse led to the problem reported in
https://www.mobileread.com/forums/showthread.php?t=367195
This commit is contained in:
parent
d1227c0817
commit
bcefa6b18e
@ -1237,9 +1237,7 @@ class BooksView(TableView): # {{{
|
||||
@property
|
||||
def visible_columns(self):
|
||||
h = self.horizontalHeader()
|
||||
logical_indices = (x for x in range(h.count()) if not h.isSectionHidden(x))
|
||||
rmap = dict(enumerate(self.column_map))
|
||||
return (rmap[h.visualIndex(x)] for x in logical_indices if h.visualIndex(x) > -1)
|
||||
return (key for lidx,key in enumerate(self.column_map) if not h.isSectionHidden(lidx))
|
||||
|
||||
def refresh_book_details(self, force=False):
|
||||
idx = self.currentIndex()
|
||||
|
Loading…
x
Reference in New Issue
Block a user