Fix issue with layout-modifying modules (need to build fill() into the recalc itself at some point)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -1256,5 +1256,5 @@ class Fit(object):
|
||||
fit.clear()
|
||||
|
||||
fit.calculateModifiedAttributes()
|
||||
|
||||
fit.fill()
|
||||
pyfalog.info("=" * 10 + "recalc time: " + str(time() - start_time) + "=" * 10)
|
||||
|
||||
Reference in New Issue
Block a user