Ignore:
Timestamp:
Apr 20, 2009 2:38:55 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:
773806e
Parents:
2b8b1a2
Message:

reducing possibility to fit the same model many time

File:
1 edited

Legend:

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

    r1c1436d r513115c  
    167167        self.graph=graph 
    168168        for item in graph.plottables: 
     169            if hasattr(item,"is_data"): 
     170                if item.is_data== False: 
     171                    return [] 
     172            
    169173            if item.__class__.__name__ is "Data2D": 
    170174                return [["Select data  for Fitting",\ 
     
    434438                    templist = page.get_param_list() 
    435439                    for element in templist: 
    436                         name = str(element[0].GetLabelText()) 
     440                        name = str(element[1]) 
    437441                        pars.append(name) 
    438442                    #Set Engine  (model , data) related to the page on  
     
    967971                if new_plot.id == data.id: 
    968972                    new_plot.id += "Model" 
    969           
     973                new_plot.is_data =False  
    970974            # Pass the reset flag to let the plotting event handler 
    971975            # know that we are replacing the whole plot 
     
    10201024         
    10211025        else: 
    1022             theory.id= "Model" 
    1023             theory.group_id= "Model"+data.name 
     1026            theory.id= data.id+"Model" 
     1027            theory.group_id= data.name+"Model" 
    10241028            theory.x_bins= data.x_bins 
    10251029            theory.y_bins= data.y_bins 
    10261030            theory.detector= data.detector 
    10271031            theory.source= data.source 
    1028              
     1032            theory.is_data =False  
    10291033            ## plot boundaries 
    10301034            theory.ymin= data.ymin 
Note: See TracChangeset for help on using the changeset viewer.