correct type for linenumbers in codeeditor

This commit is contained in:
Dominik Demuth 2023-08-05 15:31:17 +02:00
parent 258922772e
commit ec8fafcc9c

View File

@ -237,7 +237,7 @@ class CodeEditor(QtWidgets.QPlainTextEdit):
if block.isVisible() and (bottom >= evt.rect().top()): if block.isVisible() and (bottom >= evt.rect().top()):
number = str(block_number + 1) number = str(block_number + 1)
painter.setPen(QtCore.Qt.black) painter.setPen(QtCore.Qt.black)
painter.drawText(0, top, self.current_linenumber.width() - 3, height, painter.drawText(0, int(top), self.current_linenumber.width() - 3, height,
QtCore.Qt.AlignRight, number) QtCore.Qt.AlignRight, number)
block = block.next() block = block.next()