diff --git a/gui/builtinGraphs/base.py b/gui/builtinGraphs/base.py index 8907ee047..8ce475764 100644 --- a/gui/builtinGraphs/base.py +++ b/gui/builtinGraphs/base.py @@ -104,7 +104,7 @@ class FitGraph(metaclass=ABCMeta): def clearCache(self, reason, extraData=None): # If only one fit changed - clear plots which concern this fit - if reason == GraphCacheCleanupReason.fitChanged: + if reason in (GraphCacheCleanupReason.fitChanged, GraphCacheCleanupReason.fitRemoved): # Clear plot cache plotKeysToClear = set() for cacheKey in self._plotCache: diff --git a/gui/builtinGraphs/fitDamageStats/graph.py b/gui/builtinGraphs/fitDamageStats/graph.py index 31b3c7389..725a906dc 100644 --- a/gui/builtinGraphs/fitDamageStats/graph.py +++ b/gui/builtinGraphs/fitDamageStats/graph.py @@ -46,7 +46,7 @@ class FitDamageStatsGraph(FitGraph): # time input, and it regenerates once time goes beyond cached value # - Option changes are irrelevant as cache contains "raw" damage # values which do not rely on any graph options - if reason == GraphCacheCleanupReason.fitChanged: + if reason in (GraphCacheCleanupReason.fitChanged, GraphCacheCleanupReason.fitRemoved): self._timeCache.clearForFit(extraData) self._projectedCache.clearForFit(extraData) elif reason == GraphCacheCleanupReason.graphSwitched: diff --git a/gui/builtinGraphs/fitDamageStats/projectedCache.py b/gui/builtinGraphs/fitDamageStats/projectedCache.py index 2c6c3c605..cfadcb977 100644 --- a/gui/builtinGraphs/fitDamageStats/projectedCache.py +++ b/gui/builtinGraphs/fitDamageStats/projectedCache.py @@ -19,6 +19,7 @@ from gui.builtinGraphs.base import FitDataCache +from eos.const import FittingModuleState class ProjectedDataCache(FitDataCache): @@ -32,6 +33,8 @@ class ProjectedDataCache(FitDataCache): tpMods = [] projectedData = self._data.setdefault(fit.ID, {})['modules'] = (webMods, tpMods) for mod in fit.modules: + if mod.state <= FittingModuleState.ONLINE: + continue if 'remoteWebifierFalloff' in mod.item.effects or 'structureModuleEffectStasisWebifier' in mod.item.effects: webMods.append((mod.getModifiedItemAttr('speedFactor'), mod.maxRange or 0, mod.falloff or 0, 'default')) if 'remoteTargetPaintFalloff' in mod.item.effects or 'structureModuleEffectTargetPainter' in mod.item.effects: diff --git a/gui/builtinGraphs/fitWarpTime.py b/gui/builtinGraphs/fitWarpTime.py index 0b3ace785..7b3153aab 100644 --- a/gui/builtinGraphs/fitWarpTime.py +++ b/gui/builtinGraphs/fitWarpTime.py @@ -35,7 +35,7 @@ class FitWarpTimeGraph(FitGraph): self._subspeedCache = SubwarpSpeedCache() def _clearInternalCache(self, reason, extraData): - if reason == GraphCacheCleanupReason.fitChanged: + if reason in (GraphCacheCleanupReason.fitChanged, GraphCacheCleanupReason.fitRemoved): self._subspeedCache.clearForFit(extraData) elif reason == GraphCacheCleanupReason.graphSwitched: self._subspeedCache.clearAll() diff --git a/gui/graphFrame/lists.py b/gui/graphFrame/lists.py index 6acf09867..e4567231d 100644 --- a/gui/graphFrame/lists.py +++ b/gui/graphFrame/lists.py @@ -136,7 +136,7 @@ class BaseList(gui.display.Display): self.fits.remove(fit) self.update(self.fits) for fit in fits: - self.graphFrame.clearCache(reason=GraphCacheCleanupReason.fitChanged, extraData=fit.ID) + self.graphFrame.clearCache(reason=GraphCacheCleanupReason.fitRemoved, extraData=fit.ID) self.graphFrame.draw() def unbindExternalEvents(self): diff --git a/service/const.py b/service/const.py index 436c3cdf1..2d8ec4ab7 100644 --- a/service/const.py +++ b/service/const.py @@ -122,6 +122,7 @@ class GraphDpsDroneMode(IntEnum): @unique class GraphCacheCleanupReason(IntEnum): fitChanged = auto() + fitRemoved = auto() graphSwitched = auto() inputChanged = auto() optionChanged = auto()