mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 02:34:06 -04:00
Fix error when changing libraries with a device connected
This commit is contained in:
parent
b829afe225
commit
dbf1f184b3
@ -563,7 +563,11 @@ class BooksView(QTableView): # {{{
|
|||||||
# Because of a bug in Qt 5 we have to ensure that the header is actually
|
# 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
|
# relaid out by changing this value, without this sometimes the ghost
|
||||||
# of the ondevice column remains visible when changing libraries
|
# of the ondevice column remains visible when changing libraries
|
||||||
|
try:
|
||||||
col = self._model.column_map.index('ondevice')
|
col = self._model.column_map.index('ondevice')
|
||||||
|
except ValueError:
|
||||||
|
pass # DeviceBooksView
|
||||||
|
else:
|
||||||
val = h.isSectionHidden(col)
|
val = h.isSectionHidden(col)
|
||||||
h.setSectionHidden(col, not val)
|
h.setSectionHidden(col, not val)
|
||||||
h.setSectionHidden(col, val)
|
h.setSectionHidden(col, val)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user