Changeset 6999659 in sasview


Ignore:
Timestamp:
Apr 8, 2009 3:19:50 PM (16 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:
7c845cb
Parents:
3b605bb
Message:

restore mode for model page

Location:
sansview/perspectives/fitting
Files:
2 edited

Legend:

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

    r3b605bb r6999659  
    581581            Reset the parameters at the given state 
    582582        """ 
    583         if len(self.state.parameters)!=  len(listtorestore) : 
     583        if len(statelist)==0 or  len(listtorestore)==0 : 
     584            return 
     585        if len(statelist)!=  len(listtorestore) : 
    584586            return 
    585587        for j in range(len(listtorestore)): 
  • sansview/perspectives/fitting/fitpanel.py

    r3b605bb r6999659  
    7676        ## list of existing fit page 
    7777        self.list_fitpage_name=[] 
    78         self.draw_model_name=None 
     78     
    7979        #model page info 
    8080        self.model_page_number=None 
     
    118118            if selected_page.window_name== "Model": 
    119119                fitproblem = self.get_current_page().model.clone() 
    120                 self.draw_model_name=None 
    121120                self.model_page=None 
    122121                 
    123122            if  page_number == 1: 
    124123                self.model_page=None 
    125                 self.draw_model_name=None 
     124                 
    126125             
    127126        elif selected_page==self.about_page: 
     
    213212         
    214213    
    215     def add_model_page(self,model, qmin=0, qmax=0.1, 
     214    def add_model_page(self,model,page_title="Model", qmin=0, qmax=0.1, 
    216215                        npts=50, topmenu=False, reset=False): 
    217216        """ 
     
    227226        """ 
    228227        if topmenu==True: 
    229             if  self.draw_model_name ==None: 
    230                 self._help_add_model_page(model=model, 
     228            if not page_title in self.fit_page_name.keys()or reset==True: 
     229                self._help_add_model_page(model=model, page_title=page_title, 
    231230                                qmin=qmin, qmax=qmax, npts=npts, reset=reset) 
    232231            else: 
    233                 self.model_page.select_model(model, "Model") 
    234         
     232                self.model_page.select_model(model, page_title) 
     233                self.fit_page_name[page_title].insert(0,self.model_page.createMemento()) 
    235234       
    236235            
Note: See TracChangeset for help on using the changeset viewer.