From 8ca9a9cccfc340b26ceaeddf938ebb15984c88bb Mon Sep 17 00:00:00 2001 From: Bastien Jacquet Date: Wed, 1 Oct 2014 18:59:32 +0100 Subject: [PATCH] 8096: Fix new event default type considering existing events with *default* role --- gramps/gui/editors/displaytabs/eventembedlist.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gramps/gui/editors/displaytabs/eventembedlist.py b/gramps/gui/editors/displaytabs/eventembedlist.py index 9eb60ad8c..1a2d2adbc 100644 --- a/gramps/gui/editors/displaytabs/eventembedlist.py +++ b/gramps/gui/editors/displaytabs/eventembedlist.py @@ -214,8 +214,9 @@ class EventEmbedList(DbGUIElement, GroupEmbeddedList): event = None for event_ref in self.get_data()[0]: - event = self.dbstate.db.get_event_from_handle(event_ref.ref) - type_list.append(event.get_type()) + if event_ref.get_role() == self.default_role(): + event = self.dbstate.db.get_event_from_handle(event_ref.ref) + type_list.append(event.get_type()) _std_types = self.default_types() for etype in _std_types: