From e7ba2423aac3da9679ba5e9bb773e5451c68dcc2 Mon Sep 17 00:00:00 2001 From: Nick Hall Date: Sat, 25 Jul 2015 23:04:23 +0100 Subject: [PATCH] Make place title in GEDCOM export date dependent --- gramps/plugins/export/exportgedcom.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gramps/plugins/export/exportgedcom.py b/gramps/plugins/export/exportgedcom.py index 699dc7dae..01dc48fde 100644 --- a/gramps/plugins/export/exportgedcom.py +++ b/gramps/plugins/export/exportgedcom.py @@ -1094,7 +1094,7 @@ class GedcomWriter(UpdateCallback): if event.get_place_handle(): place = self.dbase.get_place_from_handle(event.get_place_handle()) - self._place(place, 2) + self._place(place, dateobj, 2) for attr in event.get_attribute_list(): attr_type = attr.get_type() @@ -1165,8 +1165,8 @@ class GedcomWriter(UpdateCallback): if lds_ord.get_temple(): self._writeln(index+1, 'TEMP', lds_ord.get_temple()) if lds_ord.get_place_handle(): - self._place( - self.dbase.get_place_from_handle(lds_ord.get_place_handle()), 2) + place = self.dbase.get_place_from_handle(lds_ord.get_place_handle()) + self._place(place, lds_ord.get_date_object(), 2) if lds_ord.get_status() != LdsOrd.STATUS_NONE: self._writeln(2, 'STAT', LDS_STATUS[lds_ord.get_status()]) @@ -1370,7 +1370,7 @@ class GedcomWriter(UpdateCallback): self._note_references(photo_obj.get_note_list(), level+1) - def _place(self, place, level): + def _place(self, place, dateobj, level): """ PLACE_STRUCTURE:= n PLAC {1:1} @@ -1385,7 +1385,7 @@ class GedcomWriter(UpdateCallback): +1 <> {0:M} """ if place is None: return - place_name = place_displayer.display(self.dbase, place) + place_name = place_displayer.display(self.dbase, place, dateobj) self._writeln(level, "PLAC", place_name.replace('\r', ' '), limit=120) longitude = place.get_longitude() latitude = place.get_latitude()