From 01c3a2e87a12eb27ce2212339006c1ccad792e8f Mon Sep 17 00:00:00 2001 From: cncfanatics Date: Sun, 29 Aug 2010 14:10:18 +0200 Subject: [PATCH] Do sanity checking before fitting a module --- controller/fit.py | 4 +++- eos | 2 +- gui/statsPane.py | 5 +---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/controller/fit.py b/controller/fit.py index 5d8f49a8f..f0134a891 100644 --- a/controller/fit.py +++ b/controller/fit.py @@ -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() diff --git a/eos b/eos index 8498a5242..5c9e6828e 160000 --- a/eos +++ b/eos @@ -1 +1 @@ -Subproject commit 8498a524268228301d6b043b1c8b6f8f531783dc +Subproject commit 5c9e6828e58a6b78200ad056032d2ba975e681fe diff --git a/gui/statsPane.py b/gui/statsPane.py index 117902e2b..04e7adca2 100644 --- a/gui/statsPane.py +++ b/gui/statsPane.py @@ -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()