From 5324ca28d4629c9ddba10b00b47b874be057ea64 Mon Sep 17 00:00:00 2001 From: Paul Franklin Date: Tue, 4 Nov 2014 07:28:22 -0800 Subject: [PATCH] 5150: new Event types are saved as a disordered list --- gramps/gui/editors/editevent.py | 3 ++- gramps/gui/editors/editeventref.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gramps/gui/editors/editevent.py b/gramps/gui/editors/editevent.py index bd154be07..5c7ef8381 100644 --- a/gramps/gui/editors/editevent.py +++ b/gramps/gui/editors/editevent.py @@ -100,7 +100,8 @@ class EditEvent(EditPrimary): return dialog_title def get_custom_events(self): - return self.dbstate.db.get_event_types() + return sorted(self.dbstate.db.get_event_types(), + key=lambda s: s.lower()) def _local_init(self): self.width_key = 'interface.event-width' diff --git a/gramps/gui/editors/editeventref.py b/gramps/gui/editors/editeventref.py index 3c7c0dc69..04dac44ba 100644 --- a/gramps/gui/editors/editeventref.py +++ b/gramps/gui/editors/editeventref.py @@ -94,7 +94,7 @@ class EditEventRef(EditReference): self.add_event = self.db.add_event def get_custom_events(self): - return self.db.get_event_types() + return sorted(self.db.get_event_types(), key=lambda s: s.lower()) def _connect_signals(self): self.define_ok_button(self.top.get_object('ok'),self.ok_clicked)