Ignore:
Timestamp:
Oct 16, 2011 12:59:57 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:
e7281fd
Parents:
a490860
Message:

minor changes for better flow

File:
1 edited

Legend:

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

    r9e9be13 rdafc36f  
    795795        sizer.Clear(True) 
    796796         
    797         new_name = wx.StaticText(self, -1, 'New Model Name',  
     797        new_name = wx.StaticText(self, -1, '  Model Title ', 
    798798                                 style=wx.ALIGN_CENTER) 
    799799        new_name.SetBackgroundColour('orange') 
     800        new_name.SetForegroundColour(wx.WHITE) 
    800801        sizer.Add(new_name,(iy, ix),(1,1), 
    801802                            wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 
    802803        ix += 2  
    803         model_type = wx.StaticText(self, -1, '  Model Type') 
     804        model_type = wx.StaticText(self, -1, '  Model ') 
    804805        model_type.SetBackgroundColour('grey') 
     806        model_type.SetForegroundColour(wx.WHITE) 
    805807        sizer.Add(model_type,(iy, ix),(1,1), 
    806808                            wx.EXPAND|wx.ADJUST_MINSIZE, 0)  
    807809        ix += 1  
    808         data_used = wx.StaticText(self, -1, '  Used Data') 
     810        data_used = wx.StaticText(self, -1, '  Data ') 
    809811        data_used.SetBackgroundColour('grey') 
     812        data_used.SetForegroundColour(wx.WHITE) 
    810813        sizer.Add(data_used,(iy, ix),(1,1), 
    811814                            wx.EXPAND|wx.ADJUST_MINSIZE, 0)  
    812815        ix += 1  
    813         tab_used = wx.StaticText(self, -1, '  Fit Tab') 
     816        tab_used = wx.StaticText(self, -1, '  FitPage ') 
    814817        tab_used.SetBackgroundColour('grey') 
     818        tab_used.SetForegroundColour(wx.WHITE) 
    815819        sizer.Add(tab_used,(iy, ix),(1,1), 
    816820                            wx.EXPAND|wx.ADJUST_MINSIZE, 0)  
     
    821825                ix = 0 
    822826                for fitproblem in value.get_fit_problem(): 
    823                     if  not self.parent.get_page_by_id(id).batch_on: 
    824                         iy += 1  
    825                         data = fitproblem.get_fit_data() 
    826                         model = fitproblem.get_model() 
    827                         name = '_' 
    828                         if model is not None: 
    829                             name = str(model.name) 
    830                         cb = wx.CheckBox(self, -1, name) 
    831                         cb.SetValue(False) 
    832                         cb.Enable(model is not None and data.is_data) 
    833                         sizer.Add(cb, (iy, ix), (1, 1),  
    834                                    wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 
    835                         wx.EVT_CHECKBOX(self, cb.GetId(), self.check_model_name) 
    836                         ix += 2  
    837                         type = model.__class__.__name__ 
    838                         model_type = wx.StaticText(self, -1, str(type)) 
    839                         sizer.Add(model_type, (iy, ix), (1, 1),  
    840                                   wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
    841                         name = '-' 
    842                         if data is not None and data.is_data: 
    843                             name = str(data.name) 
    844                         data_used = wx.StaticText(self, -1, name) 
    845                         ix += 1  
    846                         sizer.Add(data_used, (iy, ix), (1, 1),  
    847                                   wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
    848                         ix += 1  
    849                         caption = value.get_fit_tab_caption() 
    850                         tab_caption_used= wx.StaticText(self, -1, str(caption)) 
    851                         sizer.Add(tab_caption_used, (iy, ix), (1, 1),  
    852                                   wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
    853                      
    854                         self.model_list.append([cb,value,id,model]) 
     827                    if  self.parent.get_page_by_id(id).batch_on: 
     828                        continue 
     829                    data = fitproblem.get_fit_data() 
     830                    if not data.is_data: 
     831                        continue 
     832                    model = fitproblem.get_model() 
     833                    if model == None: 
     834                        continue 
     835                    iy += 1  
     836                    name = '_' 
     837                    if model is not None: 
     838                        name = str(model.name) 
     839                    cb = wx.CheckBox(self, -1, name) 
     840                    cb.SetValue(False) 
     841                    cb.Enable(model is not None and data.is_data) 
     842                    sizer.Add(cb, (iy, ix), (1, 1),  
     843                               wx.LEFT|wx.EXPAND|wx.ADJUST_MINSIZE, 15) 
     844                    wx.EVT_CHECKBOX(self, cb.GetId(), self.check_model_name) 
     845                    ix += 2  
     846                    type = model.__class__.__name__ 
     847                    model_type = wx.StaticText(self, -1, str(type)) 
     848                    sizer.Add(model_type, (iy, ix), (1, 1),  
     849                              wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
     850                    name = '-' 
     851                    if data is not None and data.is_data: 
     852                        name = str(data.name) 
     853                    data_used = wx.StaticText(self, -1, name) 
     854                    ix += 1  
     855                    sizer.Add(data_used, (iy, ix), (1, 1),  
     856                              wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
     857                    ix += 1  
     858                    caption = value.get_fit_tab_caption() 
     859                    tab_caption_used= wx.StaticText(self, -1, str(caption)) 
     860                    sizer.Add(tab_caption_used, (iy, ix), (1, 1),  
     861                              wx.EXPAND|wx.ADJUST_MINSIZE, 0) 
    855862                 
     863                    self.model_list.append([cb,value,id,model])    
    856864            except: 
    857865                raise 
Note: See TracChangeset for help on using the changeset viewer.