Ejemplo n.º 1
0
 def removeFighters(self, fighters):
     fitID = self.mainFrame.getActiveFit()
     positions = []
     for fighter in fighters:
         if fighter in self.original:
             positions.append(self.original.index(fighter))
     self.mainFrame.command.Submit(cmd.GuiRemoveLocalFightersCommand(fitID=fitID, positions=positions))
Ejemplo n.º 2
0
 def __handleFighter(self, callingWindow, mainItem, selection):
     fitID = self.mainFrame.getActiveFit()
     fit = Fit.getInstance().getFit(fitID)
     if wx.GetMouseState().GetModifiers() in (wx.MOD_ALT, wx.MOD_CONTROL):
         fighters = getSimilarFighters(fit.fighters, mainItem)
     else:
         fighters = selection
     positions = []
     for fighter in fighters:
         if fighter in fit.fighters:
             positions.append(fit.fighters.index(fighter))
     self.mainFrame.command.Submit(cmd.GuiRemoveLocalFightersCommand(
         fitID=fitID, positions=positions))