Ignore:
Timestamp:
May 24, 2010 6:00:00 PM (15 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

File:
1 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        """ 
Note: See TracChangeset for help on using the changeset viewer.