Changeset c6036f5 in sasview for sansview/perspectives/fitting


Ignore:
Timestamp:
Mar 26, 2010 3:08:07 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:
7609f1a
Parents:
509af3d
Message:

fix bug on fitpanel

Location:
sansview/perspectives/fitting
Files:
2 edited

Legend:

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

    r2f189dc rc6036f5  
    410410        fitproblem = None 
    411411        ## removing fit page 
     412        data = selected_page.get_data() 
     413        #Don' t remove plot for 2D 
     414        flag = True 
     415        if data.__class__.__name__ == 'Data2D': 
     416            flag = False 
    412417        if selected_page in page_finder: 
    413418            #Delete the name of the page into the list of open page 
     
    415420                #Don't return any panel is the exact same page is created 
    416421                name = str(list[0]) 
    417                 if selected_page.window_name == name: 
     422                if flag and selected_page.window_name == name: 
    418423                    if type.lower() in ['theory1d', 'theory2d']: 
    419424                        self.manager.remove_plot(selected_page, theory=True) 
  • sansview/perspectives/fitting/fitting.py

    r2f189dc rc6036f5  
    698698                    wx.PostEvent(self.parent, NewPlotEvent(plot=item, title=str(title))) 
    699699                else: 
    700                     item= copy.deepcopy(plottable ) 
    701                     data= copy.deepcopy(plottable ) 
     700                    item= copy.deepcopy(plottable) 
     701                    data= copy.deepcopy(plottable) 
    702702                    item.is_data=True 
    703703                    data.is_data=True 
     
    709709                try: 
    710710                    page = self.fit_panel.add_fit_page(data) 
    711                     page.set_data(data) 
    712711                    # add data associated to the page created 
    713                     if page != None:    
     712                    if page != None:   
     713                        page.set_data(data)  
    714714                        #create a fitproblem storing all link to data,model,page creation 
    715715                        if not page in self.page_finder.keys(): 
Note: See TracChangeset for help on using the changeset viewer.