* src/Sort.py: Make sure sorting by birthdate handles correctly

missing dates
* src/WriteGedcom.py: Export source references at the global person
level


svn: r4950
This commit is contained in:
Julio Sánchez 2005-07-17 20:49:53 +00:00
parent 01eebf5e77
commit 2b2fea544a
3 changed files with 15 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2005-07-17 Julio Sanchez <jsanchez@users.sourceforge.net>
* src/Sort.py: Make sure sorting by birthdate handles correctly
missing dates
* src/WriteGedcom.py: Export source references at the global person
level
2005-07-16 Steve Hall <digitect@mindspring.org> 2005-07-16 Steve Hall <digitect@mindspring.org>
* src/data/main*.css: fix <sup> spacing in CSS files * src/data/main*.css: fix <sup> spacing in CSS files

View File

@ -111,7 +111,10 @@ class Sort:
else: else:
date2 = Date.Date() date2 = Date.Date()
val = cmp(date1,date2) dsv1 = date1.get_sort_value()
dsv2 = date2.get_sort_value()
val = cmp(dsv1,dsv2)
if val == 0: if val == 0:
return self.by_last_name(first_id,second_id) return self.by_last_name(first_id,second_id)
return val return val

View File

@ -129,6 +129,11 @@ def add_familys_sources(db,family_handle,slist,private):
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
def add_persons_sources(db,person,slist,private): def add_persons_sources(db,person,slist,private):
for source_ref in person.get_source_references():
sbase = source_ref.get_base_handle()
if sbase != None and not slist.has_key(sbase):
slist[sbase] = 1
elist = person.get_event_list()[:] elist = person.get_event_list()[:]
elist.append(person.get_birth_handle()) elist.append(person.get_birth_handle())