Skip to content

Commit

Permalink
fix mouse event in console
Browse files Browse the repository at this point in the history
  • Loading branch information
slarosa committed Oct 6, 2012
1 parent c212e91 commit 50c28a9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/console_sci.py
Expand Up @@ -435,11 +435,12 @@ def keyPressEvent(self, e):
def mousePressEvent(self, e):
"""
Re-implemented to handle the mouse press event.
event: the mouse press event (QMouseEvent)
e: the mouse press event (QMouseEvent)
"""
if e.button() == Qt.MidButton:
stringSel = unicode(QApplication.clipboard().text(QClipboard.Selection))
self.insertFromDropPaste(stringSel)
self.setFocus()
self.paste()
e.accept()
else:
QsciScintilla.mousePressEvent(self, e)
Expand Down

0 comments on commit 50c28a9

Please sign in to comment.