Ejemplo n.º 1
0
 def Do(self):
     cmd = CalcAddBoosterCommand(
         fitID=self.fitID, boosterInfo=BoosterInfo(itemID=self.itemID))
     success = self.internalHistory.submit(cmd)
     Fit.getInstance().recalc(self.fitID)
     wx.PostEvent(gui.mainFrame.MainFrame.getInstance(),
                  GE.FitChanged(fitID=self.fitID))
     return success
Ejemplo n.º 2
0
 def Do(self):
     cmd = CalcAddBoosterCommand(
         fitID=self.fitID, boosterInfo=BoosterInfo(itemID=self.itemID))
     success = self.internalHistory.submit(cmd)
     Market.getInstance().storeRecentlyUsed(self.itemID)
     eos.db.flush()
     sFit = Fit.getInstance()
     sFit.recalc(self.fitID)
     sFit.fill(self.fitID)
     eos.db.commit()
     wx.PostEvent(gui.mainFrame.MainFrame.getInstance(),
                  GE.FitChanged(fitIDs=(self.fitID, )))
     return success
Ejemplo n.º 3
0
 def Do(self):
     results = []
     for itemID in self.boosters:
         cmd = CalcAddBoosterCommand(fitID=self.fitID, boosterInfo=BoosterInfo(itemID=itemID))
         results.append(self.internalHistory.submit(cmd))
     success = any(results)
     eos.db.flush()
     sFit = Fit.getInstance()
     sFit.recalc(self.fitID)
     sFit.fill(self.fitID)
     eos.db.commit()
     wx.PostEvent(gui.mainFrame.MainFrame.getInstance(), GE.FitChanged(fitIDs=(self.fitID,)))
     return success