(self, event)
| 883 | errMsgLbl=_t("Export Error")) |
| 884 | |
| 885 | def exportHtml(self, event): |
| 886 | from gui.utils.exportHtml import exportHtml |
| 887 | |
| 888 | sFit = Fit.getInstance() |
| 889 | settings = HTMLExportSettings.getInstance() |
| 890 | |
| 891 | path = settings.getPath() |
| 892 | |
| 893 | if not os.path.isdir(os.path.dirname(path)): |
| 894 | with wx.MessageDialog( |
| 895 | self, |
| 896 | _t("Invalid Path") + "\n\n" + |
| 897 | _t("The following path is invalid or does not exist:") + |
| 898 | f"\n{path}\n\n" + |
| 899 | _t("Please verify path location pyfa's preferences."), |
| 900 | _t("Error"), |
| 901 | wx.OK | wx.ICON_ERROR |
| 902 | ) as dlg: |
| 903 | if dlg.ShowModal() == wx.ID_OK: |
| 904 | return |
| 905 | progress = ProgressHelper( |
| 906 | message=_t("Generating HTML file at: {}").format(path), |
| 907 | maximum=sFit.countAllFits() + 1) |
| 908 | call = (exportHtml.getInstance().refreshFittingHtml, [True, progress], {}) |
| 909 | self.handleProgress( |
| 910 | title=_t("Backup fits"), |
| 911 | style=wx.PD_APP_MODAL | wx.PD_ELAPSED_TIME, |
| 912 | call=call, |
| 913 | progress=progress) |
| 914 | |
| 915 | def handleProgress(self, title, style, call, progress, errMsgLbl=None): |
| 916 | extraArgs = {} |
nothing calls this directly
no test coverage detected