mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-01-09 21:36:10 +01:00
Fix regression that broke clicking on column headers in the device views
This commit is contained in:
commit
bf25208fa9
1 changed files with 9 additions and 8 deletions
|
|
@ -304,14 +304,15 @@ def show_column_header_context_menu(self, pos):
|
|||
a.setCheckable(True)
|
||||
a.setChecked(True)
|
||||
|
||||
if self._model.db.field_metadata[col]['is_category']:
|
||||
act = self.column_header_context_menu.addAction(_('Quickview column %s') %
|
||||
name,
|
||||
partial(self.column_header_context_handler, action='quickview',
|
||||
column=col))
|
||||
rows = self.selectionModel().selectedRows()
|
||||
if len(rows) > 1:
|
||||
act.setEnabled(False)
|
||||
if not isinstance(self, DeviceBooksView):
|
||||
if self._model.db.field_metadata[col]['is_category']:
|
||||
act = self.column_header_context_menu.addAction(_('Quickview column %s') %
|
||||
name,
|
||||
partial(self.column_header_context_handler, action='quickview',
|
||||
column=col))
|
||||
rows = self.selectionModel().selectedRows()
|
||||
if len(rows) > 1:
|
||||
act.setEnabled(False)
|
||||
|
||||
hidden_cols = [self.column_map[i] for i in
|
||||
range(self.column_header.count()) if
|
||||
|
|
|
|||
Loading…
Reference in a new issue