Changes in / [94f074c4:1176137] in sasview
- Location:
- src/sas
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sascalc/fit/pagestate.py
r574adc7 r3b070a0 646 646 name = value.split(':', 1)[1].strip() 647 647 file_value = "File name:" + name 648 #Truncating string so print doesn't complain of being outside margins 649 if sys.platform != "win32": 650 MAX_STRING_LENGHT = 50 651 if len(file_value) > MAX_STRING_LENGHT: 652 file_value = "File name:.."+file_value[-MAX_STRING_LENGHT+10:] 648 653 file_name = CENTRE % file_value 649 654 if len(title) == 0: … … 721 726 html_str, text_str, title = self._get_report_string() 722 727 # Allow 2 figures to append 723 image_links = [FEET_2%fig for fig in fig_urls] 724 728 #Constraining image width for OSX and linux, so print doesn't complain of being outside margins 729 if sys.platform == "win32": 730 image_links = [FEET_2%fig for fig in fig_urls] 731 else: 732 image_links = [FEET_2_unix%fig for fig in fig_urls] 725 733 # final report html strings 726 734 report_str = html_str + ELINE.join(image_links) 727 735 report_str += FEET_3 728 736 return report_str, text_str 729 737 … … 1368 1376 """ 1369 1377 FEET_2 = \ 1370 """<img src="%s" ></img> 1378 """<img src="%s"></img> 1379 """ 1380 FEET_2_unix = \ 1381 """<img src="%s" width="540"></img> 1371 1382 """ 1372 1383 FEET_3 = \ -
src/sas/sasgui/guiframe/report_dialog.py
r69a6897 r91552b5 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 button_save = wx.Button(self, wx.NewId(), "Save") 78 button_save.SetToolTipString("Save this report.") 79 button_save.Bind(wx.EVT_BUTTON, self.onSave, id=button_save.GetId()) 80 hbox.Add(button_save) 81 if sys.platform != "darwin": 82 button_save = wx.Button(self, wx.NewId(), "Save") 83 button_save.SetToolTipString("Save this report.") 84 button_save.Bind(wx.EVT_BUTTON, self.onSave, id=button_save.GetId()) 85 hbox.Add(button_save) 81 86 82 87 # panel for report page … … 111 116 printh.PrintText(self.report_html) 112 117 118 113 119 def OnClose(self, event=None): 114 120 """ … … 116 122 : event: Close button event 117 123 """ 124 for fig in self.fig_urls: 125 self.imgRAM.RemoveFile(fig) 126 118 127 self.Close() 119 128 -
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.