8171: Tool 'Rename Event Types' does not include custom types

This commit is contained in:
Paul Franklin 2016-04-21 22:03:29 -07:00
parent f270163c78
commit 0a3b05f156

View File

@ -55,6 +55,7 @@ class ChangeTypes(tool.BatchTool, ManagedWindow):
def __init__(self, dbstate, user, options_class, name, callback=None): def __init__(self, dbstate, user, options_class, name, callback=None):
uistate = user.uistate uistate = user.uistate
self.user = user self.user = user
self.dbstate = dbstate
tool.BatchTool.__init__(self, dbstate, user, options_class, name) tool.BatchTool.__init__(self, dbstate, user, options_class, name)
if self.fail: if self.fail:
@ -78,7 +79,9 @@ class ChangeTypes(tool.BatchTool, ManagedWindow):
# Need to display localized event names # Need to display localized event names
etype = EventType() etype = EventType()
event_names = sorted(etype.get_standard_names(), key=glocale.sort_key) custom_events = self.dbstate.db.get_event_types()
event_names = sorted(etype.get_standard_names() + custom_events,
key=glocale.sort_key)
self.fill_combo(self.auto1,event_names) self.fill_combo(self.auto1,event_names)
self.fill_combo(self.auto2,event_names) self.fill_combo(self.auto2,event_names)