Do sanity checking before fitting a module

This commit is contained in:
cncfanatics
2010-08-29 14:10:18 +02:00
parent a2906fab1c
commit 01c3a2e87a
3 changed files with 5 additions and 6 deletions

View File

@@ -76,7 +76,9 @@ class Fit(object):
fit = eos.db.getFit(fitID)
item = eos.db.getItem(itemID, eager=("attributes", "group.category"))
if item.group.category.name == "Module":
fit.modules.append(eos.types.Module(item))
m = eos.types.Module(item)
if m.fits(fit):
fit.modules.append(m)
eos.db.saveddata_session.flush()

2
eos

Submodule eos updated: 8498a52426...5c9e6828e5

View File

@@ -45,7 +45,7 @@ class StatsPane(wx.Panel):
elif val > 10**7:
return ("%." + str(digits)+ "fM") % (val / float(10**6))
elif val > 10**4:
return ("%." + str(digits )+ "fk") % (val / float(10**3))
return ("%." + str(digits)+ "fk") % (val / float(10**3))
else:
return ("%." + str(digits) + "f") % val
@@ -193,9 +193,6 @@ class StatsPane(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__(self, parent)
font1 = wx.Font(8, wx.SWISS, wx.NORMAL, wx.NORMAL)
self.SetFont(font1)
self._showNormalGauges = False
self.mainFrame = gui.mainFrame.MainFrame.getInstance()