Changeset 5818dae in sasview


Ignore:
Timestamp:
Apr 4, 2018 4:14:46 PM (7 years ago)
Author:
wojciech
Branches:
master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, unittest-saveload
Children:
062c9ea
Parents:
2a24d55
Message:

Reverted save button as potential solution to the problem has been found

Location:
src/sas
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sascalc/fit/pagestate.py

    r9e6aeaf r5818dae  
    725725        # final report html strings 
    726726        report_str = html_str + ELINE.join(image_links) 
    727  
     727        report_str += FEET_3 
    728728        return report_str, text_str 
    729729 
  • src/sas/sasgui/guiframe/report_dialog.py

    r2a24d55 r5818dae  
    2727class BaseReportDialog(wx.Dialog): 
    2828 
    29     def __init__(self, report_list, *args, **kwds): 
     29    def __init__(self, report_list, imgRAM, fig_urls, *args, **kwds): 
    3030        """ 
    3131        Initialization. The parameters added to Dialog are: 
     
    3737        kwds["image"] = 'Dynamic Image' 
    3838 
     39        #MemoryFSHandle for storing images 
     40        self.imgRAM = imgRAM 
     41        #Images location in urls 
     42        self.fig_urls = fig_urls 
    3943        # title 
    4044        self.SetTitle("Report") 
     
    7579        hbox.Add(button_print) 
    7680 
    77         if sys.platform == "win32": 
    78             button_save = wx.Button(self, wx.NewId(), "Save") 
    79             button_save.SetToolTipString("Save this report.") 
    80             button_save.Bind(wx.EVT_BUTTON, self.onSave, id=button_save.GetId()) 
    81             hbox.Add(button_save) 
     81        button_save = wx.Button(self, wx.NewId(), "Save") 
     82        button_save.SetToolTipString("Save this report.") 
     83        button_save.Bind(wx.EVT_BUTTON, self.onSave, id=button_save.GetId()) 
     84        hbox.Add(button_save) 
    8285 
    8386        # panel for report page 
     
    112115        printh.PrintText(self.report_html) 
    113116 
     117 
    114118    def OnClose(self, event=None): 
    115119        """ 
     
    117121        : event: Close button event 
    118122        """ 
     123        for fig in self.fig_urls: 
     124            self.imgRAM.RemoveFile(fig) 
     125 
    119126        self.Close() 
    120127 
  • src/sas/sasgui/perspectives/fitting/basepage.py

    r1f4d708 r5818dae  
    641641        # get the strings for report 
    642642        report_str, text_str = self.state.report(fig_urls=refs) 
    643  
    644643        # Show the dialog 
    645644        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, "") 
    647646        dialog.Show() 
    648647 
     
    677676            refs.append('memory:' + name) 
    678677            imgRAM.AddFile(name, canvas.bitmap, wx.BITMAP_TYPE_PNG) 
    679  
    680678            # append figs 
    681679            images.append(fig) 
Note: See TracChangeset for help on using the changeset viewer.