Rework FitChanged command to avoid refreshing graph multiple times in certain cases
This commit is contained in:
@@ -155,7 +155,8 @@ class GraphFrame(wx.Frame):
|
||||
|
||||
def OnFitChanged(self, event):
|
||||
event.Skip()
|
||||
self.clearCache(reason=GraphCacheCleanupReason.fitChanged, extraData=event.fitID)
|
||||
for fitID in event.fitIDs:
|
||||
self.clearCache(reason=GraphCacheCleanupReason.fitChanged, extraData=fitID)
|
||||
self.draw()
|
||||
|
||||
def OnFitRenamed(self, event):
|
||||
|
||||
@@ -94,7 +94,8 @@ class BaseList(gui.display.Display):
|
||||
|
||||
def OnFitChanged(self, event):
|
||||
event.Skip()
|
||||
self.update(self.fits)
|
||||
if set(event.fitIDs).union(f.ID for f in self.fits):
|
||||
self.update(self.fits)
|
||||
|
||||
def getSelectedFits(self):
|
||||
fits = []
|
||||
|
||||
Reference in New Issue
Block a user