Skip to content

Commit

Permalink
destroy frame after slot clash
Browse files Browse the repository at this point in the history
  • Loading branch information
santoshmuruggu committed Jul 4, 2024
1 parent ee5b289 commit f9b56bb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions primary_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,13 @@ def apply_color():
for part in slot_parts:
if part in selected_slots:
messagebox.showwarning("Slot Clash", f"The slot '{part}' is already filled by another course.")
frame.destroy()
return
if part in conflict_dict:
for conflict in conflict_dict[part]:
if conflict in selected_slots:
messagebox.showwarning("Slot Clash", f"The slot '{part}' cannot be selected when '{conflict}' is already selected.")
frame.destroy()
return
for part in slot_parts:
selected_slots[part] = color_dict[color]
Expand Down

0 comments on commit f9b56bb

Please sign in to comment.