Ignore:
Timestamp:
Sep 20, 2012 1:22:02 PM (12 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:
bda809e
Parents:
b71a53b
Message:

category stuffs start working in interp. environment

File:
1 edited

Legend:

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

    rdf7a7e3 rea5fa58  
    3636    """ 
    3737 
    38     def __init__(self, parent, m_dict, color='rand'): 
     38    def __init__(self, parent, color='rand'): 
    3939        """ 
    4040        Initialization of the Panel 
    4141        """ 
    4242        BasicPage.__init__(self, parent, color=color) 
    43         self.populate_box(m_dict) 
    44  
     43         
    4544        ## draw sizer 
    4645        self._fill_data_sizer() 
     
    6867        #create a default data for an empty panel 
    6968        self.create_default_data() 
    70  
     69     
    7170    def enable_fit_button(self): 
    7271        """ 
     
    10881087        call back for model selection 
    10891088        """ 
    1090         # if we're just clearing the box then do nothing 
    1091         if self.model_box.GetCount() == 0 or \ 
    1092                 self.model_box.GetStringSelection() == '': 
    1093             return 
    1094  
    1095  
    10961089        self.Show(False) 
    10971090        copy_flag = False 
    10981091        is_poly_enabled = None 
    10991092        if event != None: 
    1100             # if (event.GetEventObject() == self.formfactorbox\ 
    1101             #             and self.structurebox.GetLabel() != 'None')\ 
    1102             #             or event.GetEventObject() == self.structurebox\ 
    1103             #             or event.GetEventObject() == self.multifactorbox: 
    1104             copy_flag = self.get_copy_params() 
    1105             is_poly_enabled = self.enable_disp.GetValue() 
    1106  
    1107         self.model_name = self.model_box.GetStringSelection() 
     1093            if (event.GetEventObject() == self.formfactorbox\ 
     1094                        and self.structurebox.GetLabel() != 'None')\ 
     1095                        or event.GetEventObject() == self.structurebox\ 
     1096                        or event.GetEventObject() == self.multifactorbox: 
     1097                copy_flag = self.get_copy_params() 
     1098                is_poly_enabled = self.enable_disp.GetValue() 
     1099 
    11081100        self._on_select_model_helper() 
    11091101        self.set_model_param_sizer(self.model) 
     
    11241116     
    11251117        self.state.structurecombobox = self.structurebox.GetLabel() 
    1126         self.state.formfactorcombobox = self.model_box.GetStringSelection() 
     1118        self.state.formfactorcombobox = self.formfactorbox.GetLabel() 
    11271119        self.enable_fit_button() 
    11281120        if self.model != None: 
     
    11831175            wx.PostEvent(self.parent, new_event) 
    11841176            #update list of plugins if new plugin is available 
    1185             # if self.plugin_rbutton.GetValue(): 
    1186             #     temp = self.parent.update_model_list() 
    1187             #     if temp: 
    1188             #         self.model_list_box = temp 
    1189                     # current_val = self.formfactorbox.GetLabel() 
    1190                     # pos = self.formfactorbox.GetSelection() 
    1191                     # self._show_combox_helper() 
    1192                     # self.formfactorbox.SetSelection(pos) 
    1193                     # self.formfactorbox.SetValue(current_val) 
     1177            custom_model = 'Customized Models' 
     1178            mod_cat = self.categorybox.GetStringSelection() 
     1179            if mod_cat == custom_model: 
     1180                temp = self.parent.update_model_list() 
     1181                if temp: 
     1182                    self.model_list_box = temp 
     1183                    current_val = self.formfactorbox.GetLabel() 
     1184                    pos = self.formfactorbox.GetSelection() 
     1185                    self._show_combox_helper() 
     1186                    self.formfactorbox.SetSelection(pos) 
     1187                    self.formfactorbox.SetValue(current_val) 
    11941188            # when select a model only from guictr/button 
    11951189            if is_poly_enabled != None: 
     
    18221816            self.dI_idata.Enable(True) 
    18231817               
    1824 #            self.formfactorbox.Enable() 
     1818            self.formfactorbox.Enable() 
    18251819            self.structurebox.Enable() 
    18261820            data_name = self.data.name 
Note: See TracChangeset for help on using the changeset viewer.