mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Do not allow user to hide all columns in book list via the context menu
This commit is contained in:
parent
fd9ff327c7
commit
c5906fa0b9
@ -260,6 +260,9 @@ class BooksView(QTableView): # {{{
|
||||
h = self.column_header
|
||||
|
||||
if action == 'hide':
|
||||
if h.hiddenSectionCount() >= h.count():
|
||||
return error_dialog(self, _('Cannot hide all columns'), _(
|
||||
'You must not hide all columns'), show=True)
|
||||
h.setSectionHidden(idx, True)
|
||||
elif action == 'show':
|
||||
h.setSectionHidden(idx, False)
|
||||
|
Loading…
x
Reference in New Issue
Block a user