Skip to content

Commit 090b830

Browse files
committed
Bug Fix
1 parent 1417b95 commit 090b830

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

main.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ def _file_setup(self) -> None:
105105

106106

107107
def initialize_variables(self) -> None:
108+
self.can_autobreak = True
108109
self.quitting = False
109110
self.history_height = 0
110111
self.graph_limit = True
@@ -896,6 +897,7 @@ def timer_mechanism(self) -> None:
896897

897898
#Get start time only at the start of timer
898899
if self.timer_manager.timer_time <= 1:
900+
self.can_autobreak = True
899901
self.data_manager.get_start_time()
900902

901903

@@ -979,6 +981,7 @@ def save_data(self) -> None:
979981

980982
#Only be able to save if time is higher than 1m
981983
if time_in_minutes >= 1:
984+
self.can_autobreak = False
982985
self.timer_manager.timer_running = False
983986
self.timer_manager.break_running = False
984987
self.unlock_widgets()
@@ -1068,7 +1071,7 @@ def auto_break(self):
10681071

10691072
def try_timer():
10701073
if self.timer_manager.break_time % self.data_manager.autobreak_duration == 0:
1071-
if self.timer_manager.timer_running == False:
1074+
if self.can_autobreak == False:
10721075
return
10731076
self.timer_manager.timer_mechanism(self.timer_button, self.break_button, self.time_display_label)
10741077
else:

0 commit comments

Comments
 (0)