fix: don't handle keypress if field is readonly
authorThomasV <thomasv@gitorious>
Thu, 5 Jun 2014 20:02:49 +0000 (22:02 +0200)
committerThomasV <thomasv@gitorious>
Thu, 5 Jun 2014 20:02:49 +0000 (22:02 +0200)
gui/qt/paytoedit.py

index d18346f..bc7a2aa 100644 (file)
@@ -175,6 +175,9 @@ class PayToEdit(QTextEdit):
 
 
     def keyPressEvent(self, e):
+        if self.isReadOnly():
+            return
+
         if self.c.popup().isVisible():
             if e.key() in [Qt.Key_Enter, Qt.Key_Return]:
                 e.ignore()