diff --git a/waypoint_manager/scripts/manager_GUI.py b/waypoint_manager/scripts/manager_GUI.py index 2e25141..b2ea0a9 100755 --- a/waypoint_manager/scripts/manager_GUI.py +++ b/waypoint_manager/scripts/manager_GUI.py @@ -176,12 +176,15 @@ if (self.waypoints is not None) and (self.master.title()[0] == "*"): yn = messagebox.askyesno("Confirm", "Do you want to save changes to " + str(self.waypoints_filepath)) if yn: self.save_waypoints(str(self.waypoints_filepath)) # Yes - self.canvas.delete("all") - self.draw_image() - self.plot_origin() + self.master.title(str(self.master.title()).replace("* " + self.waypoints_filepath.name + " - ", "")) + elif (self.waypoints is not None): self.master.title(str(self.master.title()).replace(self.waypoints_filepath.name + " - ", "")) - if (self.wp_info_win is not None) and (self.wp_info_win.winfo_exists()): - self.wp_info_win.destroy() + + self.canvas.delete("all") + self.draw_image() + self.plot_origin() + if (self.wp_info_win is not None) and (self.wp_info_win.winfo_exists()): + self.wp_info_win.destroy() filepath = tkinter.filedialog.askopenfilename( parent=self.master,