Set all strings to be unicode when referencing fit.name. This won't catch all conversion errors, but it should catch most. (#1168)
This commit is contained in:
@@ -46,7 +46,7 @@ class CommandFits(ContextMenu):
|
||||
return "Command Fits"
|
||||
|
||||
def addFit(self, menu, fit, includeShip=False):
|
||||
label = fit.name if not includeShip else "({}) {}".format(fit.ship.item.name, fit.name)
|
||||
label = fit.name if not includeShip else u"({}) {}".format(fit.ship.item.name, fit.name)
|
||||
id = ContextMenu.nextID()
|
||||
self.fitMenuItemIds[id] = fit
|
||||
menuItem = wx.MenuItem(menu, id, label)
|
||||
|
||||
@@ -43,7 +43,7 @@ class TabbedFits(ContextMenu):
|
||||
continue
|
||||
fit = sFit.getFit(page.activeFitID, basic=True)
|
||||
id = ContextMenu.nextID()
|
||||
mitem = wx.MenuItem(rootMenu, id, '{}: {}'.format(fit.ship.item.name, fit.name))
|
||||
mitem = wx.MenuItem(rootMenu, id, u"{}: {}".format(fit.ship.item.name, fit.name))
|
||||
bindmenu.Bind(wx.EVT_MENU, self.handleSelection, mitem)
|
||||
self.fitLookup[id] = fit
|
||||
m.AppendItem(mitem)
|
||||
|
||||
Reference in New Issue
Block a user