MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / toggleIgnoreRestriction

Method toggleIgnoreRestriction

gui/mainFrame.py:637–657  ·  view source on GitHub ↗
(self, event)

Source from the content-addressed store, hash-verified

635 self.SetAcceleratorTable(atable)
636
637 def toggleIgnoreRestriction(self, event):
638
639 sFit = Fit.getInstance()
640 fitID = self.getActiveFit()
641 fit = sFit.getFit(fitID)
642
643 if not fit.ignoreRestrictions:
644 with wx.MessageDialog(
645 self, _t("Are you sure you wish to ignore fitting restrictions for the "
646 "current fit? This could lead to wildly inaccurate results and possible errors."),
647 _t("Confirm"), wx.YES_NO | wx.ICON_QUESTION
648 ) as dlg:
649 result = dlg.ShowModal() == wx.ID_YES
650 else:
651 with wx.MessageDialog(
652 self, _t("Re-enabling fitting restrictions for this fit will also remove any illegal items "
653 "from the fit. Do you want to continue?"), _t("Confirm"), wx.YES_NO | wx.ICON_QUESTION
654 ) as dlg:
655 result = dlg.ShowModal() == wx.ID_YES
656 if result:
657 self.command.Submit(cmd.GuiToggleFittingRestrictionsCommand(fitID=fitID))
658
659 def eveFittings(self, event):
660 EveFittings.openOne(parent=self)

Callers

nothing calls this directly

Calls 4

getActiveFitMethod · 0.95
getFitMethod · 0.80
_tFunction · 0.50
getInstanceMethod · 0.45

Tested by

no test coverage detected