add missing iterator methods to filter.py, use get_family_handles instead of the iterator in ExportGedcom.py
svn: r12790
This commit is contained in:
parent
aa5fce63a7
commit
d45f5970fb
@ -53,19 +53,19 @@ class FilterProxyDb(ProxyDbBase):
|
||||
self.plist = set(person_filter.apply(
|
||||
self.db, self.db.iter_person_handles()))
|
||||
else:
|
||||
self.plist = self.db.iter_person_handles()
|
||||
self.plist = self.db.get_person_handles()
|
||||
|
||||
if event_filter:
|
||||
self.elist = set(event_filter.apply(
|
||||
self.db, self.db.iter_event_handles()))
|
||||
else:
|
||||
self.elist = self.db.iter_event_handles()
|
||||
self.elist = self.db.get_event_handles()
|
||||
|
||||
if note_filter:
|
||||
self.nlist = set(note_filter.apply(
|
||||
self.db, self.db.iter_note_handles()))
|
||||
else:
|
||||
self.nlist = self.db.iter_note_handles()
|
||||
self.nlist = self.db.get_note_handles()
|
||||
|
||||
self.flist = set()
|
||||
for handle in list(self.plist):
|
||||
@ -296,6 +296,13 @@ class FilterProxyDb(ProxyDbBase):
|
||||
"""
|
||||
return list(self.elist)
|
||||
|
||||
def iter_event_handles(self):
|
||||
"""
|
||||
Return an iterator over database handles, one handle for each Person in
|
||||
the database.
|
||||
"""
|
||||
return self.elist
|
||||
|
||||
def get_family_handles(self):
|
||||
"""
|
||||
Return a list of database handles, one handle for each Family in
|
||||
@ -303,6 +310,13 @@ class FilterProxyDb(ProxyDbBase):
|
||||
"""
|
||||
return list(self.flist)
|
||||
|
||||
def iter_family_handles(self):
|
||||
"""
|
||||
Return an iterator over database handles, one handle for each Person in
|
||||
the database.
|
||||
"""
|
||||
return self.flist
|
||||
|
||||
def get_note_handles(self):
|
||||
"""
|
||||
Return a list of database handles, one handle for each Note in
|
||||
@ -310,6 +324,13 @@ class FilterProxyDb(ProxyDbBase):
|
||||
"""
|
||||
return list(self.nlist)
|
||||
|
||||
def iter_note_handles(self):
|
||||
"""
|
||||
Return an iterator over database handles, one handle for each Person in
|
||||
the database.
|
||||
"""
|
||||
return self.nlist
|
||||
|
||||
def get_default_person(self):
|
||||
"""returns the default Person of the database"""
|
||||
person = self.db.get_default_person()
|
||||
|
@ -918,7 +918,7 @@ class GedcomWriter(BasicUtils.UpdateCallback):
|
||||
# generate a list of (GRAMPS_ID, HANDLE) pairs. This list
|
||||
# can then be sorted by the sort routine, which will use the
|
||||
# first value of the tuple as the sort key.
|
||||
sorted_list = sort_handles_by_id(self.dbase.iter_family_handles(),
|
||||
sorted_list = sort_handles_by_id(self.dbase.get_family_handles(),
|
||||
self.dbase.get_family_from_handle)
|
||||
|
||||
# loop through the sorted list, pulling of the handle. This list
|
||||
|
Loading…
Reference in New Issue
Block a user