Working commit for adding / removing projected modules / environments
This commit is contained in:
@@ -323,5 +323,4 @@ class ProjectedView(d.Display):
|
||||
sFit = Fit.getInstance()
|
||||
thing = self.get(row)
|
||||
if thing: # thing doesn't exist if it's the dummy value
|
||||
sFit.removeProjected(fitID, thing)
|
||||
wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=fitID))
|
||||
self.mainFrame.command.Submit(cmd.GuiRemoveProjectedCommand(fitID, thing))
|
||||
|
||||
@@ -54,10 +54,11 @@ class ItemRemove(ContextMenu):
|
||||
self.mainFrame.command.Submit(cmd.GuiRemoveCargoCommand(fitID, selection[0].itemID))
|
||||
return # the command takes care of the PostEvent
|
||||
elif srcContext in ("projectedFit", "projectedModule", "projectedDrone", "projectedFighter"):
|
||||
sFit.removeProjected(fitID, selection[0])
|
||||
self.mainFrame.command.Submit(cmd.GuiRemoveProjectedCommand(fitID, selection[0]))
|
||||
return # the command takes care of the PostEvent
|
||||
elif srcContext == "commandFit":
|
||||
self.mainFrame.command.Submit(cmd.GuiRemoveCommandCommand(fitID, selection[0].ID))
|
||||
return
|
||||
return # the command takes care of the PostEvent
|
||||
wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=fitID))
|
||||
|
||||
|
||||
|
||||
@@ -13,4 +13,5 @@ from .guiAddCommand import GuiAddCommandCommand
|
||||
from .guiRemoveCommand import GuiRemoveCommandCommand
|
||||
from .guiSetMode import GuiSetModeCommand
|
||||
from .guiToggleCommand import GuiToggleCommandCommand
|
||||
from .guiAddProjected import GuiAddProjectedCommand
|
||||
from .guiAddProjected import GuiAddProjectedCommand
|
||||
from .guiRemoveProjected import GuiRemoveProjectedCommand
|
||||
@@ -5,6 +5,7 @@ import gui.mainFrame
|
||||
from gui import globalEvents as GE
|
||||
from eos.saveddata.module import Module
|
||||
from .calc.fitAddProjectedModule import FitAddProjectedModuleCommand
|
||||
from .calc.fitAddProjectedEnv import FitAddProjectedEnvCommand
|
||||
from logbook import Logger
|
||||
import eos.db
|
||||
pyfalog = Logger(__name__)
|
||||
@@ -46,10 +47,7 @@ class GuiAddProjectedCommand(wx.Command):
|
||||
# fighter = Fighter(item)
|
||||
# fit.projectedFighters.append(fighter)
|
||||
elif item.group.name in Module.SYSTEM_GROUPS:
|
||||
pyfalog.warn("WH PROJECTION NOT IMPLEMENTED")
|
||||
# module = Module(item)
|
||||
# module.state = State.ONLINE
|
||||
# fit.projectedModules.append(module)
|
||||
result = self.internal_history.Submit(FitAddProjectedEnvCommand(self.fitID, self.id))
|
||||
else:
|
||||
# attempt a regular module projection
|
||||
result = self.internal_history.Submit(FitAddProjectedModuleCommand(self.fitID, self.id))
|
||||
|
||||
Reference in New Issue
Block a user