bugfix can't cancel settings dialog if no path defined
This commit is contained in:
@@ -75,6 +75,9 @@ class SettingsWindow(tk.Toplevel):
|
||||
self.config.set("csv", "path", "")
|
||||
|
||||
def ok(self):
|
||||
if self.json_file.get() == "" or self.csv_file.get() == "":
|
||||
messagebox.showwarning(title="Fehlerhafte Konfiguration", message="Pfad für JSON oder CSV Datei fehlt")
|
||||
return
|
||||
self.config.set("json", "path", self.json_file.get())
|
||||
self.config.set("csv", "path", self.csv_file.get())
|
||||
self.close_window()
|
||||
@@ -83,9 +86,6 @@ class SettingsWindow(tk.Toplevel):
|
||||
self.close_window()
|
||||
|
||||
def close_window(self):
|
||||
if self.json_file.get() == "" or self.csv_file.get() == "":
|
||||
messagebox.showwarning(title="Fehlerhafte Konfiguration", message="Pfad für JSON oder CSV Datei fehlt")
|
||||
return
|
||||
self.destroy_window()
|
||||
|
||||
def destroy_window(self):
|
||||
|
||||
Reference in New Issue
Block a user