From 2e51508ac4ae567438c42f2e73dc33f4a0323f11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Gl=C3=BCpker?= Date: Sat, 19 Mar 2016 13:24:35 +0100 Subject: little bugfixes - startstopButton Focus - Committing/Skipping while paused --- 9kwpyqt.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/9kwpyqt.py b/9kwpyqt.py index 039ca1c..3529077 100755 --- a/9kwpyqt.py +++ b/9kwpyqt.py @@ -115,6 +115,8 @@ class CaptchaGUI(QWidget): self.timer.timeout.connect(self.onTimeout) self.timer.setSingleShot(True) + self.startstopButton.setFocus() + ################################################## # Handle gui ################################################## @@ -140,6 +142,8 @@ class CaptchaGUI(QWidget): elif key == Qt.Key_Enter or key == Qt.Key_Return: if self.skipButton.hasFocus(): self.skipCaptcha() + elif self.startstopButton.hasFocus(): + self.toggleRunning() else: self.submitCaptcha() @@ -302,9 +306,10 @@ class CaptchaGUI(QWidget): if not answer: skip = True self.timer.stop() - self.setCaptchaAnswer(answer, skip) self.captchaInputLine.setText("") self.removeCaptchaImage() + if self.currentCaptchaID: + self.setCaptchaAnswer(answer, skip) def onTimeout(self): self.running = False -- cgit v1.2.3