mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
When creating an account selector and a commodity list if provider, just duplicate
the list rather than making a copy of each commodity. When a copy is made, this copy is stored in the db, but is never deleted. This causes problems (loss of reference from account/tx to commodity) when the file is reloaded. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18407 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
5d95e03573
commit
f693c0e8bc
@ -365,24 +365,10 @@ gnc_account_sel_set_acct_filters( GNCAccountSel *gas, GList *typeFilters, GList
|
||||
gas->acctTypeFilters = g_list_copy( typeFilters );
|
||||
}
|
||||
|
||||
/* Save the commodity filter list */
|
||||
if (commodityFilters)
|
||||
{
|
||||
src = commodityFilters;
|
||||
|
||||
while (src->data != NULL)
|
||||
{
|
||||
//gnc_commodity_clone would have been nice but it expects me to
|
||||
//insert the clone into a book, which I don't want to do.
|
||||
commClone = gnc_commodity_new(qof_session_get_book(gnc_get_current_session()), "","","","",1);
|
||||
gnc_commodity_copy(commClone, src->data);
|
||||
dest = g_list_prepend(dest, commClone);
|
||||
if (src->next == NULL)
|
||||
{
|
||||
break;
|
||||
}
|
||||
src = src->next;
|
||||
}
|
||||
gas->acctCommodityFilters = dest;
|
||||
gas->acctCommodityFilters = g_list_copy(commodityFilters);
|
||||
}
|
||||
|
||||
gas_populate_list( gas );
|
||||
|
Loading…
Reference in New Issue
Block a user