mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-08 09:47:44 +01:00
When applying column header state explicitly change section hidden for every column not just the ondevice column
This commit is contained in:
parent
478c96561d
commit
fb416ddffe
1 changed files with 6 additions and 10 deletions
|
|
@ -561,16 +561,12 @@ def apply_state(self, state, max_sort_levels=3):
|
|||
sz = h.sectionSizeHint(i)
|
||||
h.resizeSection(i, sz)
|
||||
# Because of a bug in Qt 5 we have to ensure that the header is actually
|
||||
# relaid out by changing this value, without this sometimes the ghost
|
||||
# of the ondevice column remains visible when changing libraries
|
||||
try:
|
||||
col = self._model.column_map.index('ondevice')
|
||||
except ValueError:
|
||||
pass # DeviceBooksView
|
||||
else:
|
||||
val = h.isSectionHidden(col)
|
||||
h.setSectionHidden(col, not val)
|
||||
h.setSectionHidden(col, val)
|
||||
# relaid out by changing this value, without this sometimes ghost
|
||||
# columns remain visible when changing libraries
|
||||
for i in xrange(h.count()):
|
||||
val = h.isSectionHidden(i)
|
||||
h.setSectionHidden(i, not val)
|
||||
h.setSectionHidden(i, val)
|
||||
|
||||
def get_default_state(self):
|
||||
old_state = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue