From 9fe3f6ad05859a3e73022d90b225853265311f0e Mon Sep 17 00:00:00 2001 From: Enno Borgsteede Date: Sun, 10 Apr 2016 14:13:39 +1000 Subject: [PATCH] 8153 GEDCOM 5.5.1 Support Custom Event on export --- gramps/plugins/export/exportgedcom.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/gramps/plugins/export/exportgedcom.py b/gramps/plugins/export/exportgedcom.py index 4bd45b28b..0253ad800 100644 --- a/gramps/plugins/export/exportgedcom.py +++ b/gramps/plugins/export/exportgedcom.py @@ -578,14 +578,15 @@ class GedcomWriter(UpdateCallback): if event.get_description().strip(): self._writeln(2, 'TYPE', event.get_description()) else: - self._writeln(1, 'EVEN') + descr = event.get_description() + if descr: + self._writeln(1, 'EVEN', descr) + else: + self._writeln(1, 'EVEN') if val.strip(): self._writeln(2, 'TYPE', val) else: self._writeln(2, 'TYPE', str(event.get_type())) - descr = event.get_description() - if descr: - self._writeln(2, 'NOTE', "Description: " + descr) self._dump_event_stats(event, event_ref) if etype == EventType.ADOPT and not adop_written: adop_written = True @@ -855,13 +856,14 @@ class GedcomWriter(UpdateCallback): if event.get_description().strip() != "": self._writeln(2, 'TYPE', event.get_description()) else: - self._writeln(1, 'EVEN') + descr = event.get_description() + if descr: + self._writeln(1, 'EVEN', descr) + else: + self._writeln(1, 'EVEN') the_type = str(event.get_type()) if the_type: self._writeln(2, 'TYPE', the_type) - descr = event.get_description() - if descr: - self._writeln(2, 'NOTE', "Description: " + descr) def _family_event_attrs(self, attr_list, level): """