Skip to content

Commit

Permalink
New budgets save state information with no changes
Browse files Browse the repository at this point in the history
If you create a new budget and do not change any thing when closing the
budget or quitting with new budget open the state information for that
budget is saved but the budget is not. To fix this make a change to the
new budget description to force the save of the new budget.
  • Loading branch information
Bob-IT committed Feb 13, 2020
1 parent 7577afe commit b23d244
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions gnucash/gnome/gnc-plugin-budget.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,19 @@ gnc_plugin_budget_cmd_new_budget (GtkAction *action,
{
GncBudget *budget;
GncPluginPage *page;
gchar *description, *date;

g_return_if_fail (user_data != NULL);

budget = gnc_budget_new (gnc_get_current_book());
page = gnc_plugin_page_budget_new (budget);

date = qof_print_date (gnc_time (NULL));
description = g_strdup_printf ("%s: %s", _("Created"), date);
gnc_budget_set_description (budget, description);
g_free (description);
g_free (date);

gnc_main_window_open_page (user_data->window, page);
}

Expand Down

0 comments on commit b23d244

Please sign in to comment.