This commit is contained in:
Kovid Goyal 2010-05-18 00:44:55 -06:00
parent ff2fa666d4
commit ee374cac13

View File

@ -145,6 +145,7 @@ class BooksView(QTableView): # {{{
def scrollContentsBy(self, dx, dy):
# Needed as Qt bug causes headerview to not always update when scrolling
QTableView.scrollContentsBy(self, dx, dy)
if dy != 0:
self.column_header.update()
def set_ondevice_column_visibility(self):
@ -220,7 +221,10 @@ class BooksView(QTableView): # {{{
sizes = state.get('column_sizes', {})
for col, size in sizes.items():
if col in cmap:
h.resizeSection(cmap[col], sizes[col])
sz = sizes[col]
if sz < 3:
sz = h.sectionSizeHint(cmap[col])
h.resizeSection(cmap[col], sz)
self.apply_sort_history(state.get('sort_history', None))
def get_default_state(self):