mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
New budgets save state information with no changes
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.
This commit is contained in:
parent
7577afe0a9
commit
b23d2445fc
@ -149,11 +149,19 @@ gnc_plugin_budget_cmd_new_budget (GtkAction *action,
|
|||||||
{
|
{
|
||||||
GncBudget *budget;
|
GncBudget *budget;
|
||||||
GncPluginPage *page;
|
GncPluginPage *page;
|
||||||
|
gchar *description, *date;
|
||||||
|
|
||||||
g_return_if_fail (user_data != NULL);
|
g_return_if_fail (user_data != NULL);
|
||||||
|
|
||||||
budget = gnc_budget_new (gnc_get_current_book());
|
budget = gnc_budget_new (gnc_get_current_book());
|
||||||
page = gnc_plugin_page_budget_new (budget);
|
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);
|
gnc_main_window_open_page (user_data->window, page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user