示例#1
0
文件: crest.py 项目: a-tal/Pyfa
 def delAllCharacters(self):
     chars = getCrestCharacters()
     for char in chars:
         eds_queries.remove(char)
     self.charCache = {}
     wx.PostEvent(self.mainFrame,
                  GE.SsoLogout(type=CrestModes.USER, numChars=0))
示例#2
0
文件: crest.py 项目: a-tal/Pyfa
 def delCrestCharacter(self, charID):
     char = getCrestCharacter(charID)
     del self.charCache[char.ID]
     eds_queries.remove(char)
     wx.PostEvent(
         self.mainFrame,
         GE.SsoLogout(type=CrestModes.USER, numChars=len(self.charCache)))
示例#3
0
文件: fit.py 项目: a-tal/Pyfa
    def deleteFit(self, fitID):
        fit = getFit(fitID)
        sFleet = Fleet.getInstance()
        sFleet.removeAssociatedFleetData(fit)

        eds_queries.remove(fit)

        # refresh any fits this fit is projected onto. Otherwise, if we have
        # already loaded those fits, they will not reflect the changes
        for projection in fit.projectedOnto.values():
            if projection.victim_fit in sqlAlchemy.saveddata_session:  # GH issue #359
                sqlAlchemy.saveddata_session.refresh(projection.victim_fit)
示例#4
0
文件: fleet.py 项目: a-tal/Pyfa
 def removeAssociatedFleetData(self, fit):
     squadIDs = set(getSquadsIDsWithFitID(fit.ID))
     if len(squadIDs) == 0:
         return
     squads = list(getSquad(sqID) for sqID in squadIDs)
     wingIDs = set(squad.wing.ID for squad in squads)
     fleetIDs = set(squad.wing.gang.ID for squad in squads)
     for fleetID in fleetIDs:
         fleet = getFleet(fleetID)
         for wing in fleet.wings:
             wingIDs.add(wing.ID)
     for wingID in wingIDs:
         wing = getWing(wingID)
         for squad in wing.squads:
             squadIDs.add(squad.ID)
     for squadID in squadIDs:
         squad = getSquad(squadID)
         if squad.leader is not None:
             try:
                 squad.leader.boostsFits.remove(fit.ID)
             except KeyError:
                 pass
         eds_queries.remove(squad)
     for wingID in wingIDs:
         wing = getWing(wingID)
         if wing.leader is not None:
             try:
                 wing.leader.boostsFits.remove(fit.ID)
             except KeyError:
                 pass
         eds_queries.remove(wing)
     for fleetID in fleetIDs:
         fleet = getFleet(fleetID)
         if fleet.leader is not None:
             try:
                 fleet.leader.boostsFits.remove(fit.ID)
             except KeyError:
                 pass
         eds_queries.remove(fleet)
     fit.fleet = None
     return
示例#5
0
 def deletePattern(self, p):
     eds_queries.remove(p)
示例#6
0
文件: implantSet.py 项目: a-tal/Pyfa
 def deleteSet(self, implant_set):
     eds_queries.remove(implant_set)
示例#7
0
文件: character.py 项目: a-tal/Pyfa
 def delete(self, char):
     queries.remove(char)
示例#8
0
文件: fleet.py 项目: a-tal/Pyfa
 def deleteFleet(self, fleet):
     eds_queries.remove(fleet)