Ignore:
Timestamp:
Oct 12, 2011 3:26:19 PM (13 years ago)
Author:
Jae Cho <jhjcho@…>
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, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
Children:
6b3edc1
Parents:
4a52223
Message:

small fix for loading a state file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fittingview/src/sans/perspectives/fitting/fitpanel.py

    r05efe88 rea8283d  
    215215                    page_is_opened = True 
    216216            if not page_is_opened: 
    217                 panel = self._manager.add_fit_page(data=state.data) 
     217                if state.data.__class__.__name__ != 'list': 
     218                    #To support older state file format 
     219                    list_data = [state.data] 
     220                else: 
     221                    #Todo: need new file format for the list 
     222                    list_data = state.data 
     223                panel = self._manager.add_fit_page(data=list_data) 
    218224                # add data associated to the page created 
    219225                if panel is not None:   
    220226                    self._manager.store_data(uid=panel.uid,  
    221                                              data=state.data, 
     227                                             data_list=list_data, 
    222228                                             caption=panel.window_caption) 
    223229                    panel.reset_page(state=state) 
Note: See TracChangeset for help on using the changeset viewer.