gnucash maint: Bug 647805 - Interdependent report options fail to change state after using apply for a limited number of times
Geert Janssens
gjanssens at code.gnucash.org
Fri Sep 15 14:59:24 EDT 2017
Updated via https://github.com/Gnucash/gnucash/commit/3bc0241e (commit)
from https://github.com/Gnucash/gnucash/commit/b9d6e025 (commit)
commit 3bc0241e7428fd26bac16f189a8670cb9e1b2040
Author: Geert Janssens <geert at kobaltwit.be>
Date: Fri Sep 15 20:13:51 2017 +0200
Bug 647805 - Interdependent report options fail to change state after using apply for a limited number of times
On the C side an SCM guile_options object is wrapped in a GNCOptionDB. This is
however a multi-to-one relationship. That is there can be several GNCOptionDBs
wrapping the same SCM guile_options object. This happens for example when
a report is open together with its Options dialog. Both manager their own
GNCOptionDB object while both wrap the same SCM guile_options.
The problem in this bug was caused by a callback function picking the wrong
GNCOptionDB based on the given SCM guile_options object. Which GNCOptionDB
got picked was completely dependent on how g_hash_table_foreach would cycle
through the stored dbs. It appears this is dependent on the in-memory order
of the hash table's values.
By being more selective of which GNCOptionDB we're looking for, this
could be circumvented. The GNCOptionDB we want is the one related to the open
report options dialog. This GNCOptionDB is different from the one managed by
the report tab in that it has callbacks set. So from now on we search for
a GNCOptionDB that wraps the give SCM guile_options and has one particular
callback set.
Summary of changes:
src/app-utils/option-util.c | 54 +++++++++++++++++++--------------------------
1 file changed, 23 insertions(+), 31 deletions(-)
More information about the gnucash-patches
mailing list