Changeset 3f43b18 in sasview for sansview/perspectives


Ignore:
Timestamp:
Mar 23, 2009 12:57:56 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:
d3966c2
Parents:
54a26d65
Message:

plotting model name change

File:
1 edited

Legend:

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

    r54a26d65 r3f43b18  
    121121        """ 
    122122        self.sim_page= self.fit_panel.add_sim_page() 
    123         self.sim_page.add_model(self.page_finder) 
     123        self.sim_page.draw_page(self.page_finder) 
    124124         
    125125         
     
    755755        if model ==None: 
    756756            return 
    757         name = model.name 
     757        
    758758        sim_page=self.sim_page 
    759759        current_pg = self.fit_panel.get_current_page()  
     
    762762        if current_pg != sim_page: 
    763763            
    764             if len(self.page_finder[current_pg].get_model())==0: 
     764            if self.page_finder[current_pg].get_model()== None : 
    765765                 
    766766                model.name="M"+str(self.index_model) 
    767767                self.index_model += 1   
    768768            else: 
    769                 model.name= self.page_finder[current_pg].get_model()[0].name 
    770769                 
    771             try: 
    772                 metadata=self.page_finder[current_pg].get_plotted_data() 
    773                 M_name = model.name+"= "+name+"("+metadata.name+")" 
    774             except: 
    775                 M_name = model.name+"= "+name 
     770                model.name= self.page_finder[current_pg].get_model().name 
     771                 
     772            
     773            metadata = self.page_finder[current_pg].get_plotted_data() 
     774             
    776775            # save the name containing the data name with the appropriate model 
    777             self.page_finder[current_pg].set_model(model,M_name) 
    778              
     776            self.page_finder[current_pg].set_model(model) 
     777            print "wwent hete",model.name 
    779778            # save model name 
    780779            self.draw_model( model=model, data= metadata) 
    781780             
    782781            if self.sim_page!=None: 
    783                 self.sim_page.add_model(self.page_finder) 
     782                self.sim_page.draw_page(self.page_finder) 
    784783         
    785784         
     
    940939        err_image[err_image==0]= 1 
    941940        theory= Data2D(image= image , err_image= err_image) 
     941        theory.name= model.name 
    942942         
    943943        if data ==None: 
    944944            self._fill_default_model2D(theory= theory, qmax=qmax,qstep=qstep, qmin= qmin) 
    945             theory.name= model.name 
     945         
    946946        else: 
    947             theory.name= data.name 
    948947            theory.id= "Model" 
    949948            theory.group_id= "Model"+data.name 
Note: See TracChangeset for help on using the changeset viewer.