diff options
-rwxr-xr-x | 9kwpyqt.py | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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 |