This commit is contained in:
Kovid Goyal 2025-04-01 22:24:13 +05:30
commit cd0a7f740d
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -1237,9 +1237,7 @@ class BooksView(TableView): # {{{
@property @property
def visible_columns(self): def visible_columns(self):
h = self.horizontalHeader() h = self.horizontalHeader()
logical_indices = (x for x in range(h.count()) if not h.isSectionHidden(x)) return (key for lidx,key in enumerate(self.column_map) if not h.isSectionHidden(lidx))
rmap = dict(enumerate(self.column_map))
return (rmap[h.visualIndex(x)] for x in logical_indices if h.visualIndex(x) > -1)
def refresh_book_details(self, force=False): def refresh_book_details(self, force=False):
idx = self.currentIndex() idx = self.currentIndex()