gnucash maint: Move the adding of the register state file comment
Robert Fewell
bobit at code.gnucash.org
Mon Dec 16 11:08:33 EST 2019
Updated via https://github.com/Gnucash/gnucash/commit/984fe658 (commit)
from https://github.com/Gnucash/gnucash/commit/3d2e2c23 (commit)
commit 984fe65822b2a9631889727638380e30896558d8
Author: Robert Fewell <14uBobIT at gmail.com>
Date: Mon Dec 16 14:54:31 2019 +0000
Move the adding of the register state file comment
The adding of the register comment to the state file is at the start
of the gnc_table_save_state function but this only gets added if the
state_section already exists and on first register save it does not so
move it to after the register column widths are added so the
state_section will exist.
diff --git a/gnucash/register/register-gnome/table-gnome.c b/gnucash/register/register-gnome/table-gnome.c
index c03abde2b..53e53428b 100644
--- a/gnucash/register/register-gnome/table-gnome.c
+++ b/gnucash/register/register-gnome/table-gnome.c
@@ -84,11 +84,6 @@ gnc_table_save_state (Table *table, gchar * state_section, gchar * account_fulln
if (!gnc_prefs_get_bool(GNC_PREFS_GROUP_GENERAL, GNC_PREF_SAVE_GEOMETRY))
return;
-
- key = g_strdup_printf ("Register state for \"%s\"", account_fullname);
- g_key_file_set_comment (state_file, state_section, NULL, key, NULL);
- g_free (key);
-
sheet = GNUCASH_SHEET (table->ui_data);
widths = gnc_header_widths_new ();
@@ -113,6 +108,10 @@ gnc_table_save_state (Table *table, gchar * state_section, gchar * account_fulln
g_key_file_remove_key (state_file, state_section, key, NULL);
g_free (key);
}
+ key = g_strdup_printf ("Register state for \"%s\"", account_fullname);
+ g_key_file_set_comment (state_file, state_section, NULL, key, NULL);
+ g_free (key);
+
gnc_header_widths_destroy (widths);
}
Summary of changes:
gnucash/register/register-gnome/table-gnome.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
More information about the gnucash-changes
mailing list