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))
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)))
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)
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
def deletePattern(self, p): eds_queries.remove(p)
def deleteSet(self, implant_set): eds_queries.remove(implant_set)
def delete(self, char): queries.remove(char)
def deleteFleet(self, fleet): eds_queries.remove(fleet)