예제 #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)