This commit is contained in:
Kovid Goyal 2018-03-19 09:19:04 +05:30
parent ad9cefeda3
commit 4ed67af5f2
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -462,6 +462,7 @@ class BooksView(QTableView): # {{{
def show_column_header_context_menu(self, pos, view=None):
view = view or self
idx = view.column_header.logicalIndexAt(pos)
col = None
if idx > -1 and idx < len(self.column_map):
col = self.column_map[idx]
name = unicode(self.model().headerData(idx, Qt.Horizontal, Qt.DisplayRole) or '')