diff --git a/main.py b/main.py index a9d2047..c0e5017 100644 --- a/main.py +++ b/main.py @@ -187,8 +187,6 @@ class App(Ctk.CTk): self.active_frame.place_forget() self.active_frame = self.buttons_frame self.place_ui() - elif self.should_switch_to_labeling(): - self.switch_to_labeling() elif self.active_frame == self.Switch_folder: self.active_frame.place_forget() self.active_frame.disable_keybinding() @@ -209,6 +207,8 @@ class App(Ctk.CTk): self.last_frame = None self.last_opened_labeling_frame = self.labeling self.place_ui() + elif self.should_switch_to_labeling(): + self.switch_to_labeling() def should_switch_to_labeling(self): @@ -236,7 +236,8 @@ class App(Ctk.CTk): def change_window_information(self, value): if value is not None: self.window_informaton_save = value - self.window_information.configure(text=f"{self.window_informaton_save[0]} from {self.window_informaton_save[1]} -> {self.window_informaton_save[2]}") + if self.current_labeling_frame == self.labeling: + self.window_information.configure(text=f"{self.window_informaton_save[0]} from {self.window_informaton_save[1]} -> {self.window_informaton_save[2]}") def place_ui(self): self.active_frame.place(relx=0.5, rely=0.52,relwidth=0.95, relheight=0.85, anchor="center") @@ -251,7 +252,6 @@ class App(Ctk.CTk): self.close_program() def close_program(self): - self.destroy() def place_top_menu(self):