Merge pull request #1766 from pyfa-org/issue/1758

Don't run implant toggle when there is not fit loaded
This commit is contained in:
Ryan Holmes
2018-10-11 22:27:26 -04:00
committed by GitHub

View File

@@ -76,10 +76,11 @@ class ImplantView(wx.Panel):
def OnRadioSelect(self, event):
fitID = self.mainFrame.getActiveFit()
sFit = Fit.getInstance()
sFit.toggleImplantSource(fitID, ImplantLocation.FIT if self.rbFit.GetValue() else ImplantLocation.CHARACTER)
if fitID is not None:
sFit = Fit.getInstance()
sFit.toggleImplantSource(fitID, ImplantLocation.FIT if self.rbFit.GetValue() else ImplantLocation.CHARACTER)
wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=fitID))
wx.PostEvent(self.mainFrame, GE.FitChanged(fitID=fitID))
class ImplantDisplay(d.Display):