Changeset 4da35bc in sasview for sansview/perspectives/fitting


Ignore:
Timestamp:
Aug 8, 2010 5:24:15 PM (14 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:
ef16f59
Parents:
028a0e8
Message:

improved theoryplot display from (inv file)

Location:
sansview/perspectives/fitting
Files:
2 edited

Legend:

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

    rb35d3d1 r4da35bc  
    5151 
    5252(PageInfoEvent, EVT_PAGE_INFO)   = wx.lib.newevent.NewEvent() 
    53  
     53(FitStateUpdateEvent, EVT_STATE_UPDATE)   = wx.lib.newevent.NewEvent() 
    5454from fitpage import Chi2UpdateEvent 
    5555 
     
    117117        #Create a reader for fit page's state 
    118118        self.state_reader = None  
     119        self.temp_state = [] 
    119120        # Log startup 
    120121        logging.info("Fitting plug-in started")  
     
    235236        """ 
    236237        self.parent = parent 
     238        self.parent.Bind(EVT_STATE_UPDATE, self.on_set_state_helper) 
    237239        # Creation of the fit panel 
    238240        self.fit_panel = FitPanel(self.parent, -1) 
     
    302304        #return 
    303305        #working on reading state 
     306        self.temp_state = [] 
    304307        try:  
     308            # state 
    305309            # Load fitting state 
    306             page = self.fit_panel.set_state(state)   
     310            self.temp_state.append(state)  
    307311            # Make sure the user sees the fitting panel after loading 
    308             self.parent.set_perspective(self.perspective)    
     312            #self.parent.set_perspective(self.perspective)    
    309313                    
    310314        except: 
    311315            raise 
    312316         
     317    def  on_set_state_helper(self,event=None): 
     318        """ 
     319        """ 
     320        if self.temp_state == None: 
     321            return 
     322        # Load fitting state 
     323        for index in range(len(self.temp_state)): 
     324            page = self.fit_panel.set_state(self.temp_state[index])  
     325            # Make sure the user sees the fitting panel after loading 
     326            self.parent.set_perspective(self.perspective)   
     327              
     328        self.temp_state = []    
     329                  
    313330    def save_fit_state(self, filepath, fitstate):   
    314331        """ 
  • sansview/perspectives/fitting/pagestate.py

    r028a0e8 r4da35bc  
    11581158                    #    exec 'output[%d].run = [output[%d].filename]'% (ind,ind) 
    11591159                    self.call_back(state=state, datainfo=output[ind]) 
    1160                     return output[ind] 
     1160                return output[ind] 
    11611161               
    11621162        except: 
Note: See TracChangeset for help on using the changeset viewer.