Changeset a4a1ac9 in sasview for src/sas/sasgui/perspectives/fitting/basepage.py
- Timestamp:
- Sep 10, 2018 1:26:03 PM (6 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:
- 17cccd0
- Parents:
- 6015eee (diff), 44e8f48 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - git-author:
- Paul Kienzle <pkienzle@…> (09/10/18 13:26:03)
- git-committer:
- GitHub <noreply@…> (09/10/18 13:26:03)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/basepage.py
rb4398819 ra4a1ac9 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):
Note: See TracChangeset
for help on using the changeset viewer.