Use alt key in more actions as alternative or replacement to ctrl
This commit is contained in:
@@ -115,7 +115,7 @@ class CargoView(d.Display):
|
||||
fitID=self.mainFrame.getActiveFit(),
|
||||
modPosition=fit.modules[modIdx].modPosition,
|
||||
cargoItemID=self.cargo[dstRow].itemID if dstRow > -1 else None,
|
||||
copy=wx.GetMouseState().CmdDown()))
|
||||
copy=wx.GetMouseState().cmdDown))
|
||||
|
||||
def fitChanged(self, event):
|
||||
sFit = Fit.getInstance()
|
||||
|
||||
@@ -217,7 +217,7 @@ class DroneView(Display):
|
||||
event.Skip()
|
||||
return
|
||||
|
||||
amount = droneStackLimit(fit, event.itemID) if wx.GetMouseState().CmdDown() else 1
|
||||
amount = droneStackLimit(fit, event.itemID) if wx.GetMouseState().altDown else 1
|
||||
if self.mainFrame.command.Submit(cmd.GuiAddLocalDroneCommand(fitID=fitID, itemID=event.itemID, amount=amount)):
|
||||
self.mainFrame.additionsPane.select('Drones')
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ class ItemStats(ContextMenu):
|
||||
mstate = wx.GetMouseState()
|
||||
reuse = False
|
||||
|
||||
if mstate.cmdDown:
|
||||
if mstate.cmdDown or mstate.altDown:
|
||||
reuse = True
|
||||
|
||||
if self.mainFrame.GetActiveStatsWindow() is None and reuse:
|
||||
|
||||
@@ -221,7 +221,8 @@ class ChangeModuleAmmo(ContextMenu):
|
||||
|
||||
fitID = self.mainFrame.getActiveFit()
|
||||
sFit = Fit.getInstance()
|
||||
switchAll = sFit.serviceFittingOptions['ammoChangeAll'] is not wx.GetMouseState().CmdDown()
|
||||
mstate = wx.GetMouseState()
|
||||
switchAll = sFit.serviceFittingOptions['ammoChangeAll'] is not (mstate.cmdDown or mstate.altDown)
|
||||
# Switch in selection or all modules, depending on ctrl key state and settings
|
||||
if switchAll:
|
||||
fit = sFit.getFit(fitID)
|
||||
|
||||
@@ -74,8 +74,8 @@ class FitSpawner(gui.multiSwitch.TabSpawner):
|
||||
sFit = Fit.getInstance()
|
||||
openFitInNew = sFit.serviceFittingOptions["openFitInNew"]
|
||||
mstate = wx.GetMouseState()
|
||||
|
||||
if from_import or (not openFitInNew and mstate.CmdDown()) or startup or (openFitInNew and not mstate.CmdDown()):
|
||||
modifierKey = mstate.cmdDown or mstate.altDown
|
||||
if from_import or (not openFitInNew and modifierKey) or startup or (openFitInNew and not modifierKey):
|
||||
self.multiSwitch.AddPage()
|
||||
|
||||
view = self.multiSwitch.GetSelectedPage()
|
||||
@@ -380,7 +380,7 @@ class FittingView(d.Display):
|
||||
|
||||
def removeItem(self, event):
|
||||
"""Double Left Click - remove module"""
|
||||
if event.CmdDown():
|
||||
if event.cmdDown:
|
||||
return
|
||||
row, _ = self.HitTest(event.Position)
|
||||
if row != -1 and row not in self.blanks and isinstance(self.mods[row], Module):
|
||||
@@ -424,7 +424,7 @@ class FittingView(d.Display):
|
||||
fitID=self.mainFrame.getActiveFit(),
|
||||
cargoItemID=cargoItemID,
|
||||
modPosition=mod.modPosition,
|
||||
copy=wx.GetMouseState().CmdDown()))
|
||||
copy=wx.GetMouseState().cmdDown))
|
||||
|
||||
def swapItems(self, x, y, srcIdx):
|
||||
"""Swap two modules in fitting window"""
|
||||
@@ -447,10 +447,10 @@ class FittingView(d.Display):
|
||||
fitID = self.mainFrame.getActiveFit()
|
||||
if getattr(mod2, "modPosition") is not None:
|
||||
mstate = wx.GetMouseState()
|
||||
if mstate.CmdDown() and mod2.isEmpty:
|
||||
if mstate.cmdDown and mod2.isEmpty:
|
||||
self.mainFrame.command.Submit(cmd.GuiCloneLocalModuleCommand(
|
||||
fitID=fitID, srcPosition=srcIdx, dstPosition=mod2.modPosition))
|
||||
elif not mstate.CmdDown():
|
||||
elif not mstate.cmdDown:
|
||||
self.mainFrame.command.Submit(cmd.GuiSwapLocalModulesCommand(
|
||||
fitID=fitID, position1=srcIdx, position2=mod2.modPosition))
|
||||
else:
|
||||
@@ -612,7 +612,7 @@ class FittingView(d.Display):
|
||||
mods = self.getSelectedMods()
|
||||
|
||||
fitID = self.mainFrame.getActiveFit()
|
||||
ctrl = event.cmdDown or event.middleIsDown
|
||||
ctrl = event.cmdDown or event.altDown or event.middleIsDown
|
||||
click = "ctrl" if ctrl is True else "right" if event.GetButton() == 3 else "left"
|
||||
|
||||
self.mainFrame.command.Submit(cmd.GuiChangeLocalModuleStatesCommand(
|
||||
|
||||
Reference in New Issue
Block a user