2006-05-23 Don Allingham <don@gramps-project.org>

* src/DataViews/_RelationView.py: finish shading
	* src/GrampsDb/_DbUtils.py: add birth/death index set funcion
	* src/Editors/_EditPerson.py: birth/death index fixes
	* src/DisplayTabs/_PersonEventEmbedList.py: birth/death index fixes
	* src/GrampsWidgets.py: shading fixes
	* src/DisplayModels/_PeopleModel.py: birth/death index fixes



svn: r6764
This commit is contained in:
Don Allingham
2006-05-23 21:07:26 +00:00
parent 1b3d046781
commit 16b88765af
7 changed files with 101 additions and 71 deletions

View File

@@ -272,3 +272,17 @@ def update_secondary_empty(sec_table,handle,data):
def update_secondary_inmem(sec_table,handle,data):
sec_table[str(data[1])] = str(handle)
def set_birth_death_index(db, person):
birth = -1
death = -1
index = 0
for ref in person.get_event_ref_list():
event = db.get_event_from_handle(ref.ref)
if int(event.get_type()) == RelLib.EventType.BIRTH and birth == -1:
birth = index
elif int(event.get_type()) == RelLib.EventType.DEATH and death == -1:
death = index
person.birth_ref_index = birth
person.death_ref_index = death