Skip to content

Commit

Permalink
Quickfix stress mode for self testing
Browse files Browse the repository at this point in the history
  • Loading branch information
jfeil committed May 13, 2022
1 parent 2d8b977 commit 01526f7
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/main_widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,18 +528,15 @@ def update_timer_question(self, value: int):
if value == 0:
self.timer_question.stop()
else:
if self.timer_answer.isActive():
self.timer_answer.stop()
self.time_answer.reset()
self.timer_question.start()
self.start_timer()
self.time_question += value
self.init_timer_display()

def update_timer_answer(self, value: int):
if value == 0:
self.timer_answer.stop()
elif self.time_question == 0:
self.timer_answer.start()
else:
self.start_timer()
self.time_answer += value
self.init_timer_display()

Expand Down Expand Up @@ -575,6 +572,8 @@ def start_timer(self):
self.time_question.reset()
self.time_answer.reset()
self.update_timer_display()
if self.current_question is None:
return
if self.time_question and self.time_question != 0:
self.timer_question.start()
elif self.time_answer and self.time_answer != 0:
Expand Down

0 comments on commit 01526f7

Please sign in to comment.