Updated to round values that are floats to int

Only ints are handled currently, if you throw a float at it, you'll get
a stacktrace.  This is just a little safety to convert it to an int, so
if we somehow get a float (like via database injection/modification), we
quietly convert it to the expected format
This commit is contained in:
Ebag333
2016-06-12 17:24:49 -07:00
parent 111e2cc0de
commit ea106b6064

View File

@@ -239,7 +239,7 @@ class DmgPatternEditorDlg(wx.Dialog):
for field in self.DAMAGE_TYPES:
edit = getattr(self, "%sEdit" % field)
amount = getattr(p, "%sAmount" % field)
amount = int(round(getattr(p, "%sAmount" % field)))
edit.SetValue(amount)
self.block = False