From 397084a9ff09ced645b863a6d3c448ad35564e9d Mon Sep 17 00:00:00 2001 From: blitzmann Date: Thu, 26 Jan 2017 21:33:13 -0500 Subject: [PATCH 1/2] Disable rename and delete button for restricted character on character editor spawn (fix for #930) --- gui/characterEditor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gui/characterEditor.py b/gui/characterEditor.py index bf7db18bf..2a8d90afc 100644 --- a/gui/characterEditor.py +++ b/gui/characterEditor.py @@ -158,6 +158,8 @@ class CharacterEditor(wx.Frame): self.Bind(GE.CHAR_LIST_UPDATED, self.refreshCharacterList) self.entityEditor.Bind(wx.EVT_CHOICE, self.charChanged) + self.charChanged(None) + def btnRestrict(self): char = self.entityEditor.getActiveEntity() From 4111d670a7ef667445b3664bdc870f20b2b1418f Mon Sep 17 00:00:00 2001 From: blitzmann Date: Thu, 26 Jan 2017 23:52:18 -0500 Subject: [PATCH 2/2] Fix possible issue with floats coming through (see #729) --- gui/builtinContextMenus/amount.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gui/builtinContextMenus/amount.py b/gui/builtinContextMenus/amount.py index 99acdf247..4ab98e694 100644 --- a/gui/builtinContextMenus/amount.py +++ b/gui/builtinContextMenus/amount.py @@ -51,11 +51,11 @@ class AmountChanger(wx.Dialog): fitID = mainFrame.getActiveFit() if isinstance(self.thing, eos.types.Cargo): - sFit.addCargo(fitID, self.thing.item.ID, int(self.input.GetLineText(0)), replace=True) + sFit.addCargo(fitID, self.thing.item.ID, int(float(self.input.GetLineText(0))), replace=True) elif isinstance(self.thing, eos.types.Fit): - sFit.changeAmount(fitID, self.thing, int(self.input.GetLineText(0))) + sFit.changeAmount(fitID, self.thing, int(float(self.input.GetLineText(0)))) elif isinstance(self.thing, eos.types.Fighter): - sFit.changeActiveFighters(fitID, self.thing, int(self.input.GetLineText(0))) + sFit.changeActiveFighters(fitID, self.thing, int(float(self.input.GetLineText(0)))) wx.PostEvent(mainFrame, GE.FitChanged(fitID=fitID))