Ignore:
Timestamp:
Sep 17, 2012 7:11:50 PM (12 years ago)
Author:
Mathieu Doucet <doucetm@…>
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:
b71a53b
Parents:
cf7653d3
Message:

merging category branch

File:
1 edited

Legend:

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

    re4cd34c rdf7a7e3  
    3636    """ 
    3737 
    38     def __init__(self, parent, color='rand'): 
     38    def __init__(self, parent, m_dict, color='rand'): 
    3939        """ 
    4040        Initialization of the Panel 
    4141        """ 
    4242        BasicPage.__init__(self, parent, color=color) 
    43          
     43        self.populate_box(m_dict) 
     44 
    4445        ## draw sizer 
    4546        self._fill_data_sizer() 
     
    6768        #create a default data for an empty panel 
    6869        self.create_default_data() 
    69      
     70 
    7071    def enable_fit_button(self): 
    7172        """ 
     
    10871088        call back for model selection 
    10881089        """ 
     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 
    10891096        self.Show(False) 
    10901097        copy_flag = False 
    10911098        is_poly_enabled = None 
    10921099        if event != None: 
    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  
     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() 
    11001108        self._on_select_model_helper() 
    11011109        self.set_model_param_sizer(self.model) 
     
    11161124     
    11171125        self.state.structurecombobox = self.structurebox.GetLabel() 
    1118         self.state.formfactorcombobox = self.formfactorbox.GetLabel() 
     1126        self.state.formfactorcombobox = self.model_box.GetStringSelection() 
    11191127        self.enable_fit_button() 
    11201128        if self.model != None: 
     
    11751183            wx.PostEvent(self.parent, new_event) 
    11761184            #update list of plugins if new plugin is available 
    1177             if self.plugin_rbutton.GetValue(): 
    1178                 temp = self.parent.update_model_list() 
    1179                 if temp: 
    1180                     self.model_list_box = temp 
    1181                     current_val = self.formfactorbox.GetLabel() 
    1182                     pos = self.formfactorbox.GetSelection() 
    1183                     self._show_combox_helper() 
    1184                     self.formfactorbox.SetSelection(pos) 
    1185                     self.formfactorbox.SetValue(current_val) 
     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) 
    11861194            # when select a model only from guictr/button 
    11871195            if is_poly_enabled != None: 
     
    18141822            self.dI_idata.Enable(True) 
    18151823               
    1816             self.formfactorbox.Enable() 
     1824#            self.formfactorbox.Enable() 
    18171825            self.structurebox.Enable() 
    18181826            data_name = self.data.name 
Note: See TracChangeset for help on using the changeset viewer.