From c9b90eb726ec51092695536ec4d0cfcde6013e70 Mon Sep 17 00:00:00 2001 From: Adrien Tétar Date: Fri, 10 Jul 2015 02:00:56 +0200 Subject: spaceCenter: beef up bbox display --- Lib/defconQt/featureTextEditor.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'Lib/defconQt/featureTextEditor.py') diff --git a/Lib/defconQt/featureTextEditor.py b/Lib/defconQt/featureTextEditor.py index 5363034..4458ba1 100644 --- a/Lib/defconQt/featureTextEditor.py +++ b/Lib/defconQt/featureTextEditor.py @@ -158,7 +158,8 @@ class TextEditor(QPlainTextEdit): return indent def keyPressEvent(self, event): - if event.key() == Qt.Key_Return: + key = event.key() + if key == Qt.Key_Return: cursor = self.textCursor() indentLvl = self.findLineIndentLevel(cursor) newBlock = False @@ -200,10 +201,10 @@ class TextEditor(QPlainTextEdit): cursor.movePosition(QTextCursor.Up) cursor.movePosition(QTextCursor.EndOfLine) self.setTextCursor(cursor) - elif event.key() == Qt.Key_Tab: + elif key == Qt.Key_Tab: cursor = self.textCursor() cursor.insertText(self._indent) - elif event.key() == Qt.Key_Backspace: + elif key == Qt.Key_Backspace: cursor = self.textCursor() cursor.movePosition(QTextCursor.PreviousCharacter, QTextCursor.KeepAnchor, len(self._indent)) -- cgit v1.2.3