Skip to content

Commit 1417b95

Browse files
committed
Bug Fixes
- Fixed a bug where timer would automatically start after saving when auto-break was on. - Fixed a bug where widgets would lock after changing color.
1 parent 55237c2 commit 1417b95

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Package/data_management.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ def change_color(self) -> None:
391391
self.load_notes()
392392

393393
try:
394-
self.app.lock_widgets()
394+
self.app.unlock_widgets()
395395
except AttributeError:
396396
pass
397397
print("Color changed.")

main.py

Lines changed: 6 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.quitting = False
108109
self.history_height = 0
109110
self.graph_limit = True
110111
self.statistics_scroll_position = "left"
@@ -978,6 +979,8 @@ def save_data(self) -> None:
978979

979980
#Only be able to save if time is higher than 1m
980981
if time_in_minutes >= 1:
982+
self.timer_manager.timer_running = False
983+
self.timer_manager.break_running = False
981984
self.unlock_widgets()
982985

983986
if time_in_minutes >= self.goal:
@@ -1064,7 +1067,9 @@ def auto_break(self):
10641067
time_between = self.data_manager.autobreak_frequency * 60
10651068

10661069
def try_timer():
1067-
if self.timer_manager.break_time % self.data_manager.autobreak_duration == 0:
1070+
if self.timer_manager.break_time % self.data_manager.autobreak_duration == 0:
1071+
if self.timer_manager.timer_running == False:
1072+
return
10681073
self.timer_manager.timer_mechanism(self.timer_button, self.break_button, self.time_display_label)
10691074
else:
10701075
self.WINDOW.after(1000, try_timer)

0 commit comments

Comments
 (0)