Ignore:
Timestamp:
Apr 4, 2018 4:14:46 PM (6 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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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 
Note: See TracChangeset for help on using the changeset viewer.