Ignore:
Timestamp:
Sep 6, 2018 10:58:01 AM (6 years ago)
Author:
krzywon
Branches:
master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, unittest-saveload
Children:
d0ce666f
Parents:
ec4b19c
Message:

Simplify calling image handler and add documentation.

Location:
src/sas/sasgui/perspectives/invariant
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/invariant/invariant_panel.py

    rec4b19c rfa412df  
    2424from sas.sasgui.guiframe.panel_base import PanelBase 
    2525from sas.sasgui.guiframe.documentation_window import DocumentationWindow 
     26from sas.sasgui.guiframe.report_image_handler import ReportImageHandler 
    2627 
    2728logger = logging.getLogger(__name__) 
     
    783784        report_img = self.state.image 
    784785        report_list = [report_html_str, report_text_str, report_img] 
    785         imgRAM = self.state.img_handler 
     786        imgRAM = ReportImageHandler.instance.img_holder 
    786787        refs = [self.state.wximgbmp] 
    787788        dialog = ReportDialog(report_list, imgRAM, refs, None, wx.ID_ANY, "") 
  • src/sas/sasgui/perspectives/invariant/invariant_state.py

    rec4b19c rfa412df  
    612612        wximgbmp = wx.BitmapFromImage(wximg) 
    613613        # store the image in wx.FileSystem Object 
    614         self.img_handler = ReportImageHandler() 
    615         imgs, refs = self.img_handler.instance.set_figs([fig], [wximgbmp], 'inv') 
     614        imgs, refs = ReportImageHandler.set_figs([fig], [wximgbmp], 'inv') 
    616615 
    617616        self.wximgbmp = refs[0] 
Note: See TracChangeset for help on using the changeset viewer.