Changes in src/sas/sasgui/perspectives/fitting/basepage.py [b4398819:5323490] in sasview
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/basepage.py
rb4398819 r5323490 31 31 32 32 from sas.sasgui.guiframe.panel_base import PanelBase 33 from sas.sasgui.guiframe.report_image_handler import ReportImageHandler 33 34 from sas.sasgui.guiframe.utils import format_number, check_float, IdList, \ 34 35 check_int … … 651 652 by plotting, putting it into wx.FileSystem image object 652 653 """ 653 images = [] 654 refs = [] 655 656 # For no figures in the list, prepare empty plot 657 if figs is None or len(figs) == 0: 658 figs = [None] 659 660 # Loop over the list of figures 661 # use wx.MemoryFSHandler 662 imgRAM = wx.MemoryFSHandler() 663 for fig in figs: 664 if fig is not None: 665 ind = figs.index(fig) 666 canvas = canvases[ind] 667 668 # store the image in wx.FileSystem Object 669 wx.FileSystem.AddHandler(wx.MemoryFSHandler()) 670 671 # index of the fig 672 ind = figs.index(fig) 673 674 # AddFile, image can be retrieved with 'memory:filename' 675 name = 'img_fit%s.png' % ind 676 refs.append('memory:' + name) 677 imgRAM.AddFile(name, canvas.bitmap, wx.BITMAP_TYPE_PNG) 678 # append figs 679 images.append(fig) 680 681 return imgRAM, images, refs 682 654 bitmaps = [] 655 for canvas in canvases: 656 bitmaps.append(canvas.bitmap) 657 imgs, refs = ReportImageHandler.set_figs(figs, bitmaps, 'fit') 658 659 return ReportImageHandler.instance, imgs, refs 683 660 684 661 def on_save(self, event): … … 2907 2884 self.magnetic_on = True 2908 2885 button.SetLabel("Magnetic OFF") 2909 m_value = 1 .0e-062886 m_value = 1 2910 2887 for key in self.model.magnetic_params: 2911 2888 if key.count('M0') > 0: 2912 2889 self.model.setParam(key, m_value) 2913 m_value += 0.5 e-062890 m_value += 0.5 2914 2891 else: 2915 2892 self.magnetic_on = False
Note: See TracChangeset
for help on using the changeset viewer.