short bug fix

This commit is contained in:
ingvar1995
2016-06-08 18:35:40 +03:00
parent 298dba4d6c
commit 01854ff2d0
3 changed files with 12 additions and 6 deletions

View File

@ -20,7 +20,7 @@ class MessageArea(QtGui.QPlainTextEdit):
def keyPressEvent(self, event):
if event.matches(QtGui.QKeySequence.Paste):
self.pasteEvent()
elif event.key() == QtCore.Qt.Key_Return:
elif event.key() in (QtCore.Qt.Key_Return, QtCore.Qt.Key_Enter):
modifiers = event.modifiers()
if modifiers & QtCore.Qt.ControlModifier or modifiers & QtCore.Qt.ShiftModifier:
self.insertPlainText('\n')