Rework FitChanged command to avoid refreshing graph multiple times in certain cases

This commit is contained in:
DarkPhoenix
2019-07-07 14:25:27 +03:00
parent 64bc2c34c2
commit 3a09f4b45c
98 changed files with 254 additions and 248 deletions

View File

@@ -132,7 +132,7 @@ class PFGeneralPref(PreferenceView):
if iView.active:
iView.update(iView.active)
wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=fitID))
wx.PostEvent(self.mainFrame, GE.FitChanged(fitIDs=(fitID,)))
event.Skip()
def onCBGlobalRackSlots(self, event):
@@ -140,14 +140,14 @@ class PFGeneralPref(PreferenceView):
self.cbRackLabels.Enable(self.cbRackSlots.GetValue())
fitID = self.mainFrame.getActiveFit()
self.sFit.refreshFit(fitID)
wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=fitID))
wx.PostEvent(self.mainFrame, GE.FitChanged(fitIDs=(fitID,)))
event.Skip()
def onCBGlobalRackLabels(self, event):
self.sFit.serviceFittingOptions["rackLabels"] = self.cbRackLabels.GetValue()
fitID = self.mainFrame.getActiveFit()
self.sFit.refreshFit(fitID)
wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=fitID))
wx.PostEvent(self.mainFrame, GE.FitChanged(fitIDs=(fitID,)))
event.Skip()
def OnCBGlobalCharStateChange(self, event):
@@ -166,7 +166,7 @@ class PFGeneralPref(PreferenceView):
self.sFit.serviceFittingOptions["compactSkills"] = self.cbCompactSkills.GetValue()
fitID = self.mainFrame.getActiveFit()
self.sFit.refreshFit(fitID)
wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=fitID))
wx.PostEvent(self.mainFrame, GE.FitChanged(fitIDs=(fitID,)))
event.Skip()
def onCBReopenFits(self, event):