From 90ebd5f2cbc06152be72ba6b58a7f4823ce7164f Mon Sep 17 00:00:00 2001 From: Michiel Nauta Date: Tue, 20 Dec 2011 18:52:48 +0000 Subject: [PATCH] 5410: Merge dialog (context) ignores role on Events section for Person objects svn: r18644 --- src/Merge/mergeperson.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Merge/mergeperson.py b/src/Merge/mergeperson.py index 10a8ef2d4..68f23f3fa 100644 --- a/src/Merge/mergeperson.py +++ b/src/Merge/mergeperson.py @@ -196,10 +196,15 @@ class MergePeople(ManagedWindow.ManagedWindow): self.add(tobj, title, _("Events")) for event_ref in person.get_event_ref_list(): event_handle = event_ref.ref + role = event_ref.get_role() name = str( self.database.get_event_from_handle(event_handle).get_type()) - self.add(tobj, normal, "%s:\t%s" % - (name, self.get_event_info(event_handle))) + if role.is_primary(): + self.add(tobj, normal, "%s:\t%s" % + (name, self.get_event_info(event_handle))) + else: + self.add(tobj, normal, "%s (%s):\t%s" % + (name, role, self.get_event_info(event_handle))) plist = person.get_parent_family_handle_list() if len(plist) > 0: