* src/FamilyView.py: keep focus on correct family after a new
child is added * src/plugins/WriteGedcom.py: catch filter exceptions * src/GenericFilter.py: eliminate loop detection svn: r1761
This commit is contained in:
parent
df6c1648ad
commit
8e8a0c8449
@ -268,14 +268,38 @@ class FamilyView:
|
|||||||
except:
|
except:
|
||||||
DisplayTrace.DisplayTrace()
|
DisplayTrace.DisplayTrace()
|
||||||
|
|
||||||
|
def update_person_list(self,person):
|
||||||
|
if not self.family:
|
||||||
|
self.family = self.parent.db.newFamily()
|
||||||
|
person.addFamily(self.family)
|
||||||
|
if person.getGender() == RelLib.Person.male:
|
||||||
|
self.family.setFather(person)
|
||||||
|
else:
|
||||||
|
self.family.setMother(person)
|
||||||
|
|
||||||
|
self.family.addChild(person)
|
||||||
|
person.addAltFamily(self.family,"Birth","Birth")
|
||||||
|
self.parent.update_person_list(person)
|
||||||
|
self.load_family(self.family)
|
||||||
|
|
||||||
def child_after_edit(self,epo,plist):
|
def child_after_edit(self,epo,plist):
|
||||||
|
|
||||||
if epo.person.getId() == "":
|
if epo.person.getId() == "":
|
||||||
self.parent.db.addPerson(epo.person)
|
self.parent.db.addPerson(epo.person)
|
||||||
else:
|
else:
|
||||||
self.parent.db.addPersonNoMap(epo.person,epo.person.getId())
|
self.parent.db.addPersonNoMap(epo.person,epo.person.getId())
|
||||||
|
|
||||||
self.parent.db.buildPersonDisplay(epo.person.getId())
|
self.parent.db.buildPersonDisplay(epo.person.getId())
|
||||||
self.parent.add_to_person_list(epo.person,0)
|
self.parent.add_to_person_list(epo.person,0)
|
||||||
|
|
||||||
|
if not self.family:
|
||||||
|
self.family = self.parent.db.newFamily()
|
||||||
|
self.person.addFamily(self.family)
|
||||||
|
if self.person.getGender() == RelLib.Person.male:
|
||||||
|
self.family.setFather(self.person)
|
||||||
|
else:
|
||||||
|
self.family.setMother(self.person)
|
||||||
|
|
||||||
self.family.addChild(epo.person)
|
self.family.addChild(epo.person)
|
||||||
epo.person.addAltFamily(self.family,"Birth","Birth")
|
epo.person.addAltFamily(self.family,"Birth","Birth")
|
||||||
self.load_family(self.family)
|
self.load_family(self.family)
|
||||||
@ -286,7 +310,7 @@ class FamilyView:
|
|||||||
try:
|
try:
|
||||||
SelectChild.SelectChild(self.parent.db, self.family,
|
SelectChild.SelectChild(self.parent.db, self.family,
|
||||||
self.person, self.load_family,
|
self.person, self.load_family,
|
||||||
self.parent.update_person_list)
|
self.update_person_list)
|
||||||
except:
|
except:
|
||||||
DisplayTrace.DisplayTrace()
|
DisplayTrace.DisplayTrace()
|
||||||
|
|
||||||
@ -506,10 +530,9 @@ class FamilyView:
|
|||||||
def display_marriage(self,family):
|
def display_marriage(self,family):
|
||||||
|
|
||||||
self.child_model.clear()
|
self.child_model.clear()
|
||||||
|
self.family = family
|
||||||
if not family:
|
if not family:
|
||||||
return
|
return
|
||||||
else:
|
|
||||||
self.family = family
|
|
||||||
|
|
||||||
if family.getFather() == self.person:
|
if family.getFather() == self.person:
|
||||||
self.selected_spouse = family.getMother()
|
self.selected_spouse = family.getMother()
|
||||||
|
Loading…
Reference in New Issue
Block a user