Changeset 5818dae in sasview
- Timestamp:
- Apr 4, 2018 4:14:46 PM (7 years ago)
- Branches:
- master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, unittest-saveload
- Children:
- 062c9ea
- Parents:
- 2a24d55
- Location:
- src/sas
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/fit/pagestate.py
r9e6aeaf r5818dae 725 725 # final report html strings 726 726 report_str = html_str + ELINE.join(image_links) 727 727 report_str += FEET_3 728 728 return report_str, text_str 729 729 -
src/sas/sasgui/guiframe/report_dialog.py
r2a24d55 r5818dae 27 27 class BaseReportDialog(wx.Dialog): 28 28 29 def __init__(self, report_list, *args, **kwds):29 def __init__(self, report_list, imgRAM, fig_urls, *args, **kwds): 30 30 """ 31 31 Initialization. The parameters added to Dialog are: … … 37 37 kwds["image"] = 'Dynamic Image' 38 38 39 #MemoryFSHandle for storing images 40 self.imgRAM = imgRAM 41 #Images location in urls 42 self.fig_urls = fig_urls 39 43 # title 40 44 self.SetTitle("Report") … … 75 79 hbox.Add(button_print) 76 80 77 if sys.platform == "win32": 78 button_save = wx.Button(self, wx.NewId(), "Save") 79 button_save.SetToolTipString("Save this report.") 80 button_save.Bind(wx.EVT_BUTTON, self.onSave, id=button_save.GetId()) 81 hbox.Add(button_save) 81 button_save = wx.Button(self, wx.NewId(), "Save") 82 button_save.SetToolTipString("Save this report.") 83 button_save.Bind(wx.EVT_BUTTON, self.onSave, id=button_save.GetId()) 84 hbox.Add(button_save) 82 85 83 86 # panel for report page … … 112 115 printh.PrintText(self.report_html) 113 116 117 114 118 def OnClose(self, event=None): 115 119 """ … … 117 121 : event: Close button event 118 122 """ 123 for fig in self.fig_urls: 124 self.imgRAM.RemoveFile(fig) 125 119 126 self.Close() 120 127 -
src/sas/sasgui/perspectives/fitting/basepage.py
r1f4d708 r5818dae 641 641 # get the strings for report 642 642 report_str, text_str = self.state.report(fig_urls=refs) 643 644 643 # Show the dialog 645 644 report_list = [report_str, text_str, images] 646 dialog = ReportDialog(report_list, None, wx.ID_ANY, "")645 dialog = ReportDialog(report_list, imgRAM, refs, None, wx.ID_ANY, "") 647 646 dialog.Show() 648 647 … … 677 676 refs.append('memory:' + name) 678 677 imgRAM.AddFile(name, canvas.bitmap, wx.BITMAP_TYPE_PNG) 679 680 678 # append figs 681 679 images.append(fig)
Note: See TracChangeset
for help on using the changeset viewer.