Changes

From Gramps

Signals and Callbacks

26 bytes added, 00:13, 10 September 2024
no edit summary
In the family merge example above, it would be much better for the UI element to make connection to 'family-delete', 'family-update', and 'person-update'. If a parent (or child) was removed, the 'family-update' signal would allow a correct update. If either was changed, the 'person-update' signal would allow a correct update.
One other class of db signals are object rebuilds; 'person-rebuild', 'place-rebuild', etc. These are emitted without parameters when a significant change has occurred to the db state, typically after a batch operation like an import, db repair, or other mass modification of the db. Usually, only views need to connect to these, [[Gramplets development|Gramplets]] and editors will get 'active-changed' from the view code. The <code>self.db.request_rebuild()</code> call can be used by tools which make mass changes to update the UI.
There are a few other signal from the db;
2,537
edits

Navigation menu