default types for events
svn: r6278
This commit is contained in:
parent
a3f8782e32
commit
0c0ac91881
@ -8,7 +8,8 @@
|
|||||||
family dialog (SelectFamily)
|
family dialog (SelectFamily)
|
||||||
* src/GrampsWidgets.py: select default value in menu
|
* src/GrampsWidgets.py: select default value in menu
|
||||||
* src/BaseDoc.py: pylint
|
* src/BaseDoc.py: pylint
|
||||||
* src/DisplayTabs.py: handle temple not set for LdsOrd
|
* src/DisplayTabs.py: handle temple not set for LdsOrd, provide list of
|
||||||
|
default types
|
||||||
* src/RelLib/_LdsOrd.py: unserialize returns self
|
* src/RelLib/_LdsOrd.py: unserialize returns self
|
||||||
* src/RelLib/_LdsOrdBase.py: variable name change
|
* src/RelLib/_LdsOrdBase.py: variable name change
|
||||||
|
|
||||||
|
@ -735,7 +735,19 @@ class PersonEventEmbedList(EventEmbedList):
|
|||||||
return (RelLib.EventRef.PRIMARY,'')
|
return (RelLib.EventRef.PRIMARY,'')
|
||||||
|
|
||||||
def default_type(self):
|
def default_type(self):
|
||||||
return (RelLib.Event.BIRTH,'')
|
type_list = []
|
||||||
|
ref_list = [ e for e in [self.obj.get_birth_ref(), self.obj.get_death_ref()] + \
|
||||||
|
self.obj.get_event_ref_list() if e ]
|
||||||
|
|
||||||
|
for event_ref in ref_list:
|
||||||
|
event = self.dbstate.db.get_event_from_handle(event_ref.ref)
|
||||||
|
type_list.append(event.get_type()[0])
|
||||||
|
|
||||||
|
for etype in [RelLib.Event.BIRTH, RelLib.Event.DEATH]:
|
||||||
|
if etype not in type_list:
|
||||||
|
return (etype,'')
|
||||||
|
else:
|
||||||
|
return (RelLib.Event.BIRTH,'')
|
||||||
|
|
||||||
def get_ref_editor(self):
|
def get_ref_editor(self):
|
||||||
from Editors import EditEventRef
|
from Editors import EditEventRef
|
||||||
|
Loading…
x
Reference in New Issue
Block a user