mirror of
https://github.com/netinvent/npbackup.git
synced 2025-10-11 05:57:48 +08:00
GUI: Fix when closing config GUI via window X button
This commit is contained in:
parent
22807e3016
commit
acb519d40f
1 changed files with 2 additions and 1 deletions
|
@ -1815,6 +1815,7 @@ def config_gui(full_config: dict, config_file: str):
|
||||||
default_button_element_size=(16, 1),
|
default_button_element_size=(16, 1),
|
||||||
right_click_menu=right_click_menu,
|
right_click_menu=right_click_menu,
|
||||||
finalize=True,
|
finalize=True,
|
||||||
|
enable_close_attempted_event=True
|
||||||
)
|
)
|
||||||
|
|
||||||
backup_paths_tree = sg.TreeData()
|
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-"])
|
object_type, object_name = get_object_from_combo(values["-OBJECT-SELECT-"])
|
||||||
if not current_object_type and not current_object_name:
|
if not current_object_type and not current_object_name:
|
||||||
current_object_type, current_object_name = object_type, 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
|
break
|
||||||
|
|
||||||
if event == "-OBJECT-SELECT-":
|
if event == "-OBJECT-SELECT-":
|
||||||
|
|
Loading…
Add table
Reference in a new issue