Mercurial > lcfOS
diff python/codeedit.py @ 250:f5fba5b554d7
Removal of obsolete editor
author | Windel Bouwman |
---|---|
date | Sun, 28 Jul 2013 19:07:51 +0200 |
parents | e41e4109addd |
children | 225f444019b1 |
line wrap: on
line diff
--- a/python/codeedit.py Fri Jul 26 20:26:05 2013 +0200 +++ b/python/codeedit.py Sun Jul 28 19:07:51 2013 +0200 @@ -30,10 +30,11 @@ # Initial values: self.setSource('') self.CursorPosition = 0 - t = QTimer(self) - t.timeout.connect(self.updateCursor) - t.setInterval(500) - t.start() + self.t = QTimer(self) + self.t.timeout.connect(self.updateCursor) + self.t.setInterval(500) + self.t.start() + def updateCursor(self): self.blinkcursor = not self.blinkcursor self.update() @@ -147,7 +148,7 @@ curRow = self.CursorRow ydt = -chh + self.charDescent for row in range(row1, row2 + 1): - if curRow == row: + if curRow == row and self.hasFocus(): painter.fillRect(self.xposTXT, ypos + ydt, er.width(), chh, Qt.yellow) # cursor if self.blinkcursor: