Implement batch module/charge moving
This commit is contained in:
@@ -497,11 +497,27 @@ class FittingView(d.Display):
|
||||
fit = Fit.getInstance().getFit(fitID)
|
||||
if mod in fit.modules:
|
||||
position = fit.modules.index(mod)
|
||||
self.mainFrame.command.Submit(cmd.GuiCargoToLocalModuleCommand(
|
||||
fitID=fitID,
|
||||
cargoItemID=cargoItemID,
|
||||
modPosition=position,
|
||||
copy=wx.GetMouseState().GetModifiers() == wx.MOD_CONTROL))
|
||||
modifiers = wx.GetMouseState().GetModifiers()
|
||||
isCopy = modifiers == wx.MOD_CONTROL
|
||||
isBatch = modifiers == wx.MOD_SHIFT
|
||||
if isBatch:
|
||||
self.mainFrame.command.Submit(
|
||||
cmd.GuiBatchCargoToLocalModuleCommand(
|
||||
fitID=fitID,
|
||||
cargoItemID=cargoItemID,
|
||||
targetPosition=position,
|
||||
copy=isCopy,
|
||||
)
|
||||
)
|
||||
else:
|
||||
self.mainFrame.command.Submit(
|
||||
cmd.GuiCargoToLocalModuleCommand(
|
||||
fitID=fitID,
|
||||
cargoItemID=cargoItemID,
|
||||
modPosition=position,
|
||||
copy=isCopy,
|
||||
)
|
||||
)
|
||||
|
||||
def swapItems(self, x, y, srcIdx):
|
||||
"""Swap two modules in fitting window"""
|
||||
@@ -795,7 +811,6 @@ class FittingView(d.Display):
|
||||
del mod.restrictionOverridden
|
||||
hasRestrictionOverriden = not hasRestrictionOverriden
|
||||
|
||||
|
||||
if slotMap[mod.slot] or hasRestrictionOverriden: # Color too many modules as red
|
||||
self.SetItemBackgroundColour(i, errColorDark if isDark() else errColor)
|
||||
elif sFit.serviceFittingOptions["colorFitBySlot"]: # Color by slot it enabled
|
||||
|
||||
Reference in New Issue
Block a user