From 2b2fea544a66b50da25705e370d3fbcf8ce5b0a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julio=20S=C3=A1nchez?= Date: Sun, 17 Jul 2005 20:49:53 +0000 Subject: [PATCH] * 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 --- gramps2/ChangeLog | 6 ++++++ gramps2/src/Sort.py | 5 ++++- gramps2/src/WriteGedcom.py | 5 +++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 2e2bfcdde..53521ef06 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,9 @@ +2005-07-17 Julio Sanchez + * 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 * src/data/main*.css: fix spacing in CSS files diff --git a/gramps2/src/Sort.py b/gramps2/src/Sort.py index 3d9ffd7ab..8f828534e 100644 --- a/gramps2/src/Sort.py +++ b/gramps2/src/Sort.py @@ -111,7 +111,10 @@ class Sort: else: date2 = Date.Date() - val = cmp(date1,date2) + dsv1 = date1.get_sort_value() + dsv2 = date2.get_sort_value() + + val = cmp(dsv1,dsv2) if val == 0: return self.by_last_name(first_id,second_id) return val diff --git a/gramps2/src/WriteGedcom.py b/gramps2/src/WriteGedcom.py index 2797883b9..dd4f0ba7d 100644 --- a/gramps2/src/WriteGedcom.py +++ b/gramps2/src/WriteGedcom.py @@ -129,6 +129,11 @@ def add_familys_sources(db,family_handle,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.append(person.get_birth_handle())