5410: Merge dialog (context) ignores role on Events section for Person objects

svn: r18643
This commit is contained in:
Michiel Nauta 2011-12-20 18:52:14 +00:00
parent 11a7aa2e8e
commit 3584fd804f

View File

@ -196,10 +196,15 @@ class MergePeople(ManagedWindow.ManagedWindow):
self.add(tobj, title, _("Events")) self.add(tobj, title, _("Events"))
for event_ref in person.get_event_ref_list(): for event_ref in person.get_event_ref_list():
event_handle = event_ref.ref event_handle = event_ref.ref
role = event_ref.get_role()
name = str( name = str(
self.database.get_event_from_handle(event_handle).get_type()) self.database.get_event_from_handle(event_handle).get_type())
if role.is_primary():
self.add(tobj, normal, "%s:\t%s" % self.add(tobj, normal, "%s:\t%s" %
(name, self.get_event_info(event_handle))) (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() plist = person.get_parent_family_handle_list()
if len(plist) > 0: if len(plist) > 0: