Do not select cargo/drone tab when adding drones/cargo fails
This commit is contained in:
@@ -32,12 +32,10 @@ class AddToCargo(ContextMenuSingle):
|
||||
|
||||
def activate(self, fullContext, mainItem, i):
|
||||
fitID = self.mainFrame.getActiveFit()
|
||||
|
||||
typeID = int(mainItem.ID)
|
||||
|
||||
self.mainFrame.command.Submit(cmd.GuiAddCargoCommand(
|
||||
fitID=fitID, itemID=typeID, amount=1))
|
||||
self.mainFrame.additionsPane.select("Cargo")
|
||||
command = cmd.GuiAddCargoCommand(fitID=fitID, itemID=typeID, amount=1)
|
||||
if self.mainFrame.command.Submit(command):
|
||||
self.mainFrame.additionsPane.select("Cargo")
|
||||
|
||||
|
||||
AddToCargo.register()
|
||||
|
||||
@@ -28,9 +28,9 @@ class AddToCargoAmmo(ContextMenuSingle):
|
||||
def activate(self, fullContext, mainItem, i):
|
||||
fitID = self.mainFrame.getActiveFit()
|
||||
typeID = int(mainItem.ID)
|
||||
self.mainFrame.command.Submit(cmd.GuiAddCargoCommand(
|
||||
fitID=fitID, itemID=typeID, amount=1000))
|
||||
self.mainFrame.additionsPane.select("Cargo")
|
||||
command = cmd.GuiAddCargoCommand(fitID=fitID, itemID=typeID, amount=1000)
|
||||
if self.mainFrame.command.Submit(command):
|
||||
self.mainFrame.additionsPane.select("Cargo")
|
||||
|
||||
|
||||
AddToCargoAmmo.register()
|
||||
|
||||
@@ -39,11 +39,12 @@ class DroneAddStack(ContextMenuSingle):
|
||||
itmContext, '' if self.amount == 1 else ' (x{})'.format(self.amount))
|
||||
|
||||
def activate(self, fullContext, mainItem, i):
|
||||
self.mainFrame.command.Submit(cmd.GuiAddLocalDroneCommand(
|
||||
command = cmd.GuiAddLocalDroneCommand(
|
||||
fitID=self.mainFrame.getActiveFit(),
|
||||
itemID=int(mainItem.ID),
|
||||
amount=self.amount))
|
||||
self.mainFrame.additionsPane.select('Drones')
|
||||
amount=self.amount)
|
||||
if self.mainFrame.command.Submit(command):
|
||||
self.mainFrame.additionsPane.select('Drones')
|
||||
|
||||
|
||||
DroneAddStack.register()
|
||||
|
||||
Reference in New Issue
Block a user