Changeset 6c08ba5 in sasview for fittingview/src/sans/perspectives


Ignore:
Timestamp:
Sep 15, 2011 12:13:26 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:
4133316
Parents:
b2aef1c
Message:

disabled checkbox if there is no data in the fitpage

File:
1 edited

Legend:

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

    r922497f r6c08ba5  
    164164        if self.cb1.GetValue()== True: 
    165165            for item in self.model_list: 
    166                 item[0].SetValue(True) 
    167                 self.model_toFit.append(item) 
     166                if item[0].IsEnabled(): 
     167                    item[0].SetValue(True) 
     168                    self.model_toFit.append(item) 
    168169                 
    169170            ## constraint info 
     
    588589                iy += 1  
    589590                for fitproblem in value.get_fit_problem(): 
     591                    data = fitproblem.get_fit_data() 
    590592                    model = fitproblem.get_model() 
    591593                    name = '_' 
     
    594596                    cb = wx.CheckBox(self, -1, name) 
    595597                    cb.SetValue(False) 
    596                     cb.Enable(model is not None) 
     598                    cb.Enable(model is not None and data.is_data) 
    597599                    sizer.Add(cb, (iy, ix), (1, 1),  
    598600                               wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 
     
    603605                    sizer.Add(model_type, (iy, ix), (1, 1),  
    604606                              wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
    605                     data = fitproblem.get_fit_data() 
    606607                    name = '-' 
    607                     if data is not None: 
     608                    if data is not None and data.is_data: 
    608609                        name = str(data.name) 
    609610                    data_used = wx.StaticText(self, -1, name) 
Note: See TracChangeset for help on using the changeset viewer.