f1ca280441
Fixes #10754 A bit of history. bug 2060 was filed a long time ago (2008), and a patch was added to close it in 2016. I believe that the bug had already been patched by then, although I cannot be sure. The patch caused the Gramplet to update anytime the active-changed signal occurred on a person view. I suspect that this caused a fair amount of overhead on very large dbs as the entire person list was rescanned. In any event, Doug Blank recently removed the original scan code, as well as some useful functionality. And left behind a bug where a value was always zero. The users email list had some complaints about the lost functionality, and I also saw some recent complaints that the gender statistics were incorrect. Turns out that the db's genderstats data was incorrect, probably due to crashes after db updates. The Genderstats don't get saved until db closes normally. In addition, running the Genderstats rebuild tool, did not immediately appear to correct the situation, Gramps had to be restarted to show the updated results. I added the original statistics code back into the Gramplet, suitably updated for 5.0.x. So the Gramplet no longer depends on dbs genderstats, it scans for it now on its own. I removed the update on active-changed function, so overhead is only present on actual db updates (which have their own signals). I tested that the add, edit, and delete person changes do properly cause the statistics to update now. So the active-changed signal is not necessary. |
||
---|---|---|
.. | ||
cli | ||
gen | ||
gui | ||
plugins | ||
test | ||
__init__.py | ||
grampsapp.py | ||
version.py |