Changeset bb70474 in sasview for sansview/perspectives/fitting


Ignore:
Timestamp:
May 24, 2010 6:00:00 PM (14 years ago)
Author:
Gervaise Alina <gervyh@…>
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:
e9b12eaf
Parents:
31b0c47
Message:

working on save state

Location:
sansview/perspectives/fitting
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sansview/perspectives/fitting/basepage.py

    rf83b94a rbb70474  
    551551        """ 
    552552            Save the current state into file 
    553         """       
     553        """   
     554        self.save_current_state() 
     555        new_state = self.state.clone() 
     556        # Ask the user the location of the file to write to. 
     557        path = None 
     558        dlg = wx.FileDialog(self, "Choose a file", self._default_save_location, 
     559                                                 "", "*.fitv", wx.SAVE) 
     560        if dlg.ShowModal() == wx.ID_OK: 
     561            path = dlg.GetPath() 
     562            self._default_save_location = os.path.dirname(path) 
     563        else: 
     564            return None 
     565        #the manager write the state into file 
     566        self.manager.save_fit_state(filepath=path, fitstate=new_state) 
     567        return new_state   
     568       
    554569    def on_bookmark(self, event): 
    555570        """ 
  • sansview/perspectives/fitting/fitting.py

    r31b0c47 rbb70474  
    286286            @param state: PageState object 
    287287        """ 
     288        #working on reading state 
     289        return  
    288290        try:  
    289291            # Load fitting state 
  • sansview/perspectives/fitting/pagestate.py

    r11a7e11 rbb70474  
    186186        if self.model is not None: 
    187187            model = self.model.clone() 
    188          
     188            model.name = self.model.name 
    189189        obj = PageState(self.parent, model=model) 
    190190        obj.file = copy.deepcopy(self.file) 
Note: See TracChangeset for help on using the changeset viewer.