Ignore:
Timestamp:
May 24, 2010 5:10:15 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:
9c38ed4
Parents:
6c2d1a1
Message:

working on save state

File:
1 edited

Legend:

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

    r4470b10 r9bc499b6  
    130130        self.popUpMenu.AppendItem(self._keep) 
    131131        self._keep.Enable(True) 
    132         wx.EVT_MENU(self, id, self.onSave) 
     132        wx.EVT_MENU(self, id, self.on_bookmark) 
    133133        self.popUpMenu.AppendSeparator() 
    134134     
     
    548548            ## reset state of checkbox,textcrtl  and  regular parameters value 
    549549            self.reset_page(previous_state)       
    550                    
    551     def onSave(self, event): 
     550          
     551    def on_save_state(self, event):    
     552        """ 
     553            Save the current state into file 
     554        """       
     555    def on_bookmark(self, event): 
    552556        """ 
    553557            save history of the data and model 
     
    732736            self.state.disp_list= copy.deepcopy(self.disp_list) 
    733737            self.state.model = self.model.clone() 
    734         #if hasattr(self,self.engine_type)> 0: 
    735             #self.state.engine_type = self.engine_type.clone()  
     738        if hasattr(self, "engine_type"): 
     739            self.state.engine_type = copy.deepcopy(self.engine_type) 
     740             
    736741        self.state.enable2D = copy.deepcopy(self.enable2D) 
    737742        self.state.values= copy.deepcopy(self.values) 
     
    825830        if self.data !=None: 
    826831            from DataLoader.qsmearing import smear_selection 
    827             self.smearer= smear_selection( self.data ) 
     832            self.smearer= smear_selection(self.data) 
    828833        self.enable2D= state.enable2D 
    829834        self.engine_type = state.engine_type 
     
    21372142        self.btSave_title = wx.StaticText(self, -1, 'Save the current Model') 
    21382143        self.btSave = wx.Button(self,wx.NewId(),'Save') 
    2139         self.btSave.Bind(wx.EVT_BUTTON, self.onSave,id= self.btSave.GetId()) 
     2144        self.btSave.Bind(wx.EVT_BUTTON, self.on_save_state,id= self.btSave.GetId()) 
    21402145        self.btSave.SetToolTipString("Save the current Model") 
    21412146         
Note: See TracChangeset for help on using the changeset viewer.