Show "Effective" prefix when resists are not ignored

This commit is contained in:
DarkPhoenix
2019-08-05 10:26:17 +03:00
parent 858719aad8
commit deb772f0a7
4 changed files with 23 additions and 5 deletions

View File

@@ -205,6 +205,8 @@ class GraphFrame(wx.Frame):
def OnGraphOptionChanged(self, event):
event.Skip()
if getattr(event, 'refreshAxeLabels', False):
self.ctrlPanel.refreshAxeLabels()
self.clearCache(reason=GraphCacheCleanupReason.optionChanged)
self.draw()

View File

@@ -256,6 +256,17 @@ class GraphControlPanel(wx.Panel):
continue
addInputField(inputDef, handledHandles)
def refreshAxeLabels(self):
# Currently we need to refresh only Y for dps graph
selectedY = self.ySubSelection.GetSelection()
view = self.graphFrame.getView()
self.Freeze()
self.ySubSelection.Clear()
for yDef in view.yDefs:
self.ySubSelection.Append(self.formatLabel(yDef), yDef)
self.ySubSelection.SetSelection(selectedY)
self.Thaw()
def OnShowLegendChange(self, event):
event.Skip()
self.graphFrame.draw()