diff -r 77755a5ea30c -r 4f2dd0850803 UI/SymbolsWidget.py --- a/UI/SymbolsWidget.py Sat Mar 11 13:11:29 2017 +0100 +++ b/UI/SymbolsWidget.py Sat Mar 11 14:35:22 2017 +0100 @@ -360,28 +360,29 @@ @param role role of the data to retrieve (integer) @return requested data """ - id = self.__tables[self.__currentTableIndex][0] + index.row() + symbolId = self.__tables[self.__currentTableIndex][0] + index.row() if role == Qt.DisplayRole: col = index.column() if col == 0: - return self.__locale.toString(id) + return self.__locale.toString(symbolId) elif col == 1: - return chr(id) + return chr(symbolId) elif col == 2: - return "0x{0:04x}".format(id) + return "0x{0:04x}".format(symbolId) elif col == 3: - if id in html_entities.codepoint2name: - return "&{0};".format(html_entities.codepoint2name[id]) + if symbolId in html_entities.codepoint2name: + return "&{0};".format( + html_entities.codepoint2name[symbolId]) elif col == 4: - return unicodedata.name(chr(id), '').title() + return unicodedata.name(chr(symbolId), '').title() if role == Qt.BackgroundColorRole: if index.column() == 0: return QColor(Qt.lightGray) if role == Qt.TextColorRole: - char = chr(id) + char = chr(symbolId) if self.__isDigit(char): return QColor(Qt.darkBlue) elif self.__isLetter(char): @@ -552,10 +553,10 @@ """ Private slot to move the table to the entered symbol id. """ - id = self.symbolSpinBox.value() + symbolId = self.symbolSpinBox.value() first, last = self.__model.getTableBoundaries( self.__model.getTableIndex()) - row = id - first + row = symbolId - first self.symbolsTable.selectRow(row) self.symbolsTable.scrollTo( self.__model.index(row, 0), QAbstractItemView.PositionAtCenter)