5150: new Event types are saved as a disordered list

This commit is contained in:
Paul Franklin 2014-11-04 07:27:39 -08:00
parent f44e84f054
commit d349f247ea
2 changed files with 3 additions and 2 deletions

View File

@ -100,7 +100,8 @@ class EditEvent(EditPrimary):
return dialog_title return dialog_title
def get_custom_events(self): 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): def _local_init(self):
self.width_key = 'interface.event-width' self.width_key = 'interface.event-width'

View File

@ -94,7 +94,7 @@ class EditEventRef(EditReference):
self.add_event = self.db.add_event self.add_event = self.db.add_event
def get_custom_events(self): 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): def _connect_signals(self):
self.define_ok_button(self.top.get_object('ok'),self.ok_clicked) self.define_ok_button(self.top.get_object('ok'),self.ok_clicked)