From e189e6d2914001a23e7ef3df1ba52c75bd9978cb Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Mon, 13 Jan 2025 12:05:46 +0600 Subject: [PATCH] Fixed loading cancelation of custom configuration --- source/ubl-settings-services.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/ubl-settings-services.c b/source/ubl-settings-services.c index 1cc6ff6..7113678 100644 --- a/source/ubl-settings-services.c +++ b/source/ubl-settings-services.c @@ -30,7 +30,9 @@ void on_save_done(main_window *widgets, config_str output, int size){ } void yon_load_proceed(YON_CONFIG_TYPE type){ - yon_config_clean(); + if (type!=YON_CONFIG_CUSTOM){ + yon_config_clean(); + } if (!yon_char_is_empty(config_get_default_command)) yon_config_load_config(YON_CONFIG_DEFAULT,config_get_default_command,NULL); if (type==YON_CONFIG_GLOBAL){ @@ -59,6 +61,7 @@ void yon_load_proceed(YON_CONFIG_TYPE type){ } else { gtk_widget_destroy(dialog); } + yon_config_clean(); char *command = yon_config_get_custom_command(path); yon_config_load_config(type,command,NULL); }