Changeset ae9b8bf in sasview


Ignore:
Timestamp:
Jan 10, 2017 1:52:45 PM (8 years ago)
Author:
krzywon
Branches:
master, ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
73cbeec, ca6cbc1c
Parents:
27aabc1
Message:

The corfunc perspective now saves and loads in files with the extension .crf instead of .cor. Fixes #832

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • sasview/local_config.py

    r49e000b rae9b8bf  
    9797GUIFRAME_WIDTH = 1150 
    9898GUIFRAME_HEIGHT = 840 
    99 PLUGIN_STATE_EXTENSIONS = ['.fitv', '.inv', '.prv', '.cor'] 
     99PLUGIN_STATE_EXTENSIONS = ['.fitv', '.inv', '.prv', '.crf'] 
    100100PLUGINS_WLIST = ['Fitting files (*.fitv)|*.fitv', 
    101101                 'Invariant files (*.inv)|*.inv', 
    102102                 'P(r) files (*.prv)|*.prv', 
    103                  'Corfunc files (*.cor)|*.cor'] 
     103                 'Corfunc files (*.crf)|*.crf'] 
    104104PLOPANEL_WIDTH = 415 
    105105PLOPANEL_HEIGTH = 370 
  • src/sas/sasgui/perspectives/corfunc/corfunc.py

    r96d293da rae9b8bf  
    3232        self._always_active = True 
    3333        self.state_reader = Reader(self.set_state) 
    34         self._extensions = '.cor' 
     34        self._extensions = '.crf' 
    3535 
    3636    def get_panels(self, parent): 
     
    4848 
    4949        l = Loader() 
    50         l.associate_file_reader('.cor', self.state_reader) 
     50        l.associate_file_reader('.crf', self.state_reader) 
    5151 
    5252        return [self.corfunc_panel] 
     
    8181    def set_state(self, state=None, datainfo=None): 
    8282        """ 
    83         Callback for CorfuncState reader. Called when a .cor file is loaded 
     83        Callback for CorfuncState reader. Called when a .crf file is loaded 
    8484        """ 
    8585        if isinstance(datainfo, list): 
  • src/sas/sasgui/perspectives/corfunc/corfunc_panel.py

    rd45d590 rae9b8bf  
    325325        dlg = wx.FileDialog(self, "Choose a file", 
    326326                            default_save_location, \ 
    327                             self.window_caption, "*.cor", wx.SAVE) 
     327                            self.window_caption, "*.crf", wx.SAVE) 
    328328        if dlg.ShowModal() == wx.ID_OK: 
    329329            path = dlg.GetPath() 
     
    336336        dlg.Destroy() 
    337337        # MAC always needs the extension for saving 
    338         extens = ".cor" 
     338        extens = ".crf" 
    339339        # Make sure the ext included in the file name 
    340340        f_name = os.path.splitext(path)[0] + extens 
  • src/sas/sasgui/perspectives/corfunc/corfunc_state.py

    rd45d590 rae9b8bf  
    9696            self.background = value 
    9797 
    98     def toXML(self, filename='corfunc_state.cor', doc=None, entry_node=None): 
     98    def toXML(self, filename='corfunc_state.crf', doc=None, entry_node=None): 
    9999        """ 
    100100        Writes the state of the CorfuncPanel panel to file, as XML. 
     
    257257    type_name = "Corfunc" 
    258258 
    259     type = ["Corfunc file (*.cor)|*.cor", 
     259    type = ["Corfunc file (*.crf)|*.crf", 
    260260            "SASView file (*.svs)|*.svs"] 
    261261 
    262     ext = ['.cor', '.COR', '.svs', '.SVS'] 
     262    ext = ['.crf', '.CRF', '.svs', '.SVS'] 
    263263 
    264264    def __init__(self, callback): 
Note: See TracChangeset for help on using the changeset viewer.