diff --git a/gramps/gui/editors/editldsord.py b/gramps/gui/editors/editldsord.py index f7c043a65..7a6bd71ec 100644 --- a/gramps/gui/editors/editldsord.py +++ b/gramps/gui/editors/editldsord.py @@ -230,22 +230,21 @@ class EditLdsOrd(EditSecondary): self.db.readonly) self.track_ref_for_deletion('status_menu') - self.ord_type_changed() self.update_parent_label() + def _post_init(self): + self.ord_type_changed() + def ord_type_changed(self): - if self.obj.get_type() == LdsOrd.BAPTISM: - self.parents.hide() - self.parents_label.hide() - self.parents_select.hide() - elif self.obj.get_type() == LdsOrd.ENDOWMENT: - self.parents.hide() - self.parents_label.hide() - self.parents_select.hide() - elif self.obj.get_type() == LdsOrd.SEAL_TO_PARENTS: + if self.obj.get_type() == LdsOrd.SEAL_TO_PARENTS: self.parents.show() self.parents_label.show() self.parents_select.show() + else: + self.parents.hide() + self.parents_label.hide() + self.parents_select.hide() + new_data = [(item[1],item[0]) for item in LdsOrd._STATUS_MAP if item[0] in _DATA_MAP[self.obj.get_type()] ] self.status_menu.change_menu(new_data) @@ -354,6 +353,11 @@ class EditFamilyLdsOrd(EditSecondary): self.share_btn = self.top.get_object('share_place') self.add_del_btn = self.top.get_object('add_del_place') + def _post_init(self): + self.parents.hide() + self.parents_label.hide() + self.parents_select.hide() + def _connect_signals(self): self.define_cancel_button(self.top.get_object('cancel')) self.define_help_button(self.top.get_object('help'))