diff --git a/eos/saveddata/fit.py b/eos/saveddata/fit.py index 8f5cc2b36..62eaa2bb1 100644 --- a/eos/saveddata/fit.py +++ b/eos/saveddata/fit.py @@ -35,7 +35,6 @@ from eos.saveddata.character import Character from eos.saveddata.citadel import Citadel from eos.saveddata.module import Module, State, Slot, Hardpoint from logbook import Logger - pyfalog = Logger(__name__) @@ -913,6 +912,9 @@ class Fit(object): Fill this fit's module slots with enough dummy slots so that all slots are used. This is mostly for making the life of gui's easier. GUI's can call fill() and then stop caring about empty slots completely. + + todo: want to get rid of using this from the gui/commands, and instead make it a more built-in feature within + recalc. Figure out a way to keep track of any changes to slot layout and call this automatically """ if self.ship is None: return diff --git a/gui/fitCommands/guiAddModule.py b/gui/fitCommands/guiAddModule.py index 5abf52651..dad2780e1 100644 --- a/gui/fitCommands/guiAddModule.py +++ b/gui/fitCommands/guiAddModule.py @@ -4,6 +4,7 @@ import gui.mainFrame from gui import globalEvents as GE from .calc.fitAddModule import FitAddModuleCommand from .calc.fitReplaceModule import FitReplaceModuleCommand +from service.fit import Fit class GuiModuleAddCommand(wx.Command): def __init__(self, fitID, itemID, position=None): diff --git a/service/fit.py b/service/fit.py index 016f5989a..d3ed7d9c7 100644 --- a/service/fit.py +++ b/service/fit.py @@ -1256,5 +1256,5 @@ class Fit(object): fit.clear() fit.calculateModifiedAttributes() - + fit.fill() pyfalog.info("=" * 10 + "recalc time: " + str(time() - start_time) + "=" * 10)