Changeset 44e8f48 in sasview


Ignore:
Timestamp:
Sep 10, 2018 9:15: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:
0863065
Parents:
d0ce666f
Message:

Be sure image handler is initialized in invariant panel and code cleanup.

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

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/fitting/report_dialog.py

    rd0ce666f r44e8f48  
    7272        filename = basename + ext 
    7373 
    74         # save figures 
    75         pictures = [] 
    76         i = 0 
    77         for url in self.fig_urls: 
    78             append_me = url.split(':')[1] 
    79             pic_name = basename + '_{}'.format(append_me) 
    80             # save the image for use with pdf writer 
    81             self.report_list[2][i].savefig(pic_name) 
    82             pictures.append(pic_name) 
    83             i += 1 
     74        # save the images for use with pdf writer 
     75        pictures = [ 
     76            '_'.join((basename, url.split(':')[1])) for url in self.fig_urls] 
     77        for i, pic in enumerate(pictures): 
     78            self.report_list[2][i].savefig(pic) 
    8479 
    8580        # translate png references int html from in-memory name to on-disk name 
  • src/sas/sasgui/perspectives/invariant/invariant_panel.py

    rfa412df r44e8f48  
    784784        report_img = self.state.image 
    785785        report_list = [report_html_str, report_text_str, report_img] 
     786        ReportImageHandler.check_for_empty_instance() 
    786787        imgRAM = ReportImageHandler.instance.img_holder 
    787788        refs = [self.state.wximgbmp] 
Note: See TracChangeset for help on using the changeset viewer.