Changeset 93f0a862 in sasview


Ignore:
Timestamp:
Apr 3, 2012 2:07:35 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:
213b445
Parents:
c3c050e
Message:

fixed model_name on report for customized models

Location:
fittingview/src/sans/perspectives/fitting
Files:
3 edited

Legend:

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

    rc3c050e r93f0a862  
    644644        name = menu.GetLabel(event.GetId()) 
    645645        self._on_select_model_helper() 
     646        if self.model != None: 
     647            self.m_name = self.model.name 
    646648        if name in self.saved_states.keys(): 
    647649            previous_state = self.saved_states[name] 
     
    649651             
    650652            self.reset_page(previous_state)    
     653        self.state.m_name = self.m_name 
    651654        self.Show(True) 
    652655                
     
    12591262        #draw the pnael according to the new model parameter  
    12601263        self._on_select_model(event=None) 
     1264             
    12611265        # take care of 2D button 
    12621266        if data == None and self.model_view.IsEnabled(): 
     
    13281332        ## set the value of the current state to the state given as parameter 
    13291333        self.state = state.clone()  
     1334        self.state.m_name = self.m_name 
    13301335     
    13311336    def _reset_page_disp_helper(self, state): 
  • fittingview/src/sans/perspectives/fitting/fitpage.py

    rd40038e r93f0a862  
    4747        self.fit_started = False 
    4848        self.weightbt_string = None 
     49        self.m_name = None 
    4950        # get smear info from data 
    5051        self._get_smear_info() 
     
    12551256        self.enable_fit_button() 
    12561257        if self.model != None: 
     1258            self.m_name = self.model.name 
     1259            self.state.m_name = self.m_name 
    12571260            self.rename_model() 
    12581261            self._set_copy_flag(True) 
  • fittingview/src/sans/perspectives/fitting/pagestate.py

    rd40038e r93f0a862  
    172172        # model on which the fit would be performed 
    173173        self.model = model 
     174        self.m_name = None 
    174175        #list of process done to model 
    175176        self.process = [] 
     
    370371        rep += "data's id : %s\n"%self.data_id 
    371372        if self.model != None: 
    372             rep += "model name : %s\n"% self.model.__class__.__name__ 
     373            m_name = self.model.__class__.__name__ 
     374            if m_name == 'Model': 
     375                m_name = self.m_name 
     376            rep += "model name : %s\n"% m_name 
    373377        else: 
    374378            rep += "model name : None\n" 
Note: See TracChangeset for help on using the changeset viewer.