Skip to content
Permalink
Browse files

Merge pull request #275 from slarosa/master

fix mouse event in python console, 
update italian translation
  • Loading branch information
brushtyler committed Oct 7, 2012
2 parents 52de721 + 42672c1 commit ce5c2e6e224648b440186654829c3a035d47073c
Showing with 16 additions and 10 deletions.
  1. +4 −4 i18n/qgis_it.ts
  2. +12 −6 python/console_sci.py
@@ -6461,23 +6461,23 @@ Cambiare questa situazione prima, perché il plugin OSM non quale layer è la de
<message>
<source>Are you sure you want to completely
delete the command history ?</source>
<translation type="obsolete">Sei sicuro di voler concellare completamente
<translation>Sei sicuro di voler concellare completamente
la cronologia dei comandi ?</translation>
</message>
<message>
<source>## History saved successfully ##</source>
<translation type="obsolete">## Storia comandi salvata con successo ##</translation>
<translation>## Storia comandi salvata con successo ##</translation>
</message>
<message>
<source>## History cleared successfully ##</source>
<translation type="obsolete">## Storia comandi cancellata con successo ##</translation>
<translation>## Storia comandi cancellata con successo ##</translation>
</message>
<message>
<source>## To access Quantum GIS environment from this console
## use qgis.utils.iface object (instance of QgisInterface class). Read help for more info.

</source>
<translation type="obsolete">## Per accedere all&apos;ambiente Quantum GIS da questa console
<translation>## Per accedere all&apos;ambiente Quantum GIS da questa console
## usa l&apos;oggetto qgis.utils.iface (istanza della classe QgisInterface). Consulta l&apos;aiuto per ottenere più informazioni.

</translation>
@@ -435,14 +435,20 @@ 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:
self.setFocus()
self.paste()
e.accept()
linenr, index = self.getCurLine()
## Prevents paste text if cursor is not in edition zone
if not self.is_cursor_on_last_line() or index < 4:
self.move_cursor_to_end()
else:
QsciScintilla.mousePressEvent(self, e)
if e.button() == Qt.MidButton:
stringSel = unicode(QApplication.clipboard().text(QClipboard.Selection))
self.insertFromDropPaste(stringSel)
self.setFocus()
e.accept()
else:
QsciScintilla.mousePressEvent(self, e)

def paste(self):
"""Reimplement QScintilla method"""

0 comments on commit ce5c2e6

Please sign in to comment.
You can’t perform that action at this time.