GUI: Fix when closing config GUI via window X button

This commit is contained in:
deajan 2024-05-25 16:01:46 +02:00
parent 22807e3016
commit acb519d40f

View file

@ -1815,6 +1815,7 @@ def config_gui(full_config: dict, config_file: str):
default_button_element_size=(16, 1),
right_click_menu=right_click_menu,
finalize=True,
enable_close_attempted_event=True
)
backup_paths_tree = sg.TreeData()
@ -1842,7 +1843,7 @@ def config_gui(full_config: dict, config_file: str):
object_type, object_name = get_object_from_combo(values["-OBJECT-SELECT-"])
if not current_object_type and not current_object_name:
current_object_type, current_object_name = object_type, object_name
if event in (sg.WIN_CLOSED, sg.WIN_X_EVENT, "--CANCEL--"):
if event in (sg.WIN_CLOSED, sg.WIN_X_EVENT, "--CANCEL--", "-WINDOW CLOSE ATTEMPTED-"):
break
if event == "-OBJECT-SELECT-":