Don't try to set the active parents relationship if active_parents is None

svn: r256
This commit is contained in:
Don Allingham 2001-07-26 15:33:38 +00:00
parent 7bf31dbcf3
commit 4385f7c855

View File

@ -477,7 +477,7 @@ def on_choose_parents_clicked(obj):
family_window = libglade.GladeXML(const.gladeFile,"familyDialog")
familyDialog = family_window.get_widget("familyDialog")
if active_parents == active_person.getMainFamily():
if active_parents and active_parents == active_person.getMainFamily():
family_window.get_widget("mrel").set_text(_("Birth"))
family_window.get_widget("frel").set_text(_("Birth"))
else:
@ -506,6 +506,7 @@ def on_choose_parents_clicked(obj):
text = _("Choose the Parents of %s") % Config.nameof(active_person)
family_window.get_widget("chooseTitle").set_text(text)
if active_parents:
prel.set_text(active_parents.getRelationship())
familyDialog.show()