Changeset ea5fa58 in sasview for fittingview/src/sans/perspectives/fitting/fitpage.py
- Timestamp:
- Sep 20, 2012 1:22:02 PM (12 years ago)
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fittingview/src/sans/perspectives/fitting/fitpage.py
rdf7a7e3 rea5fa58 36 36 """ 37 37 38 def __init__(self, parent, m_dict,color='rand'):38 def __init__(self, parent, color='rand'): 39 39 """ 40 40 Initialization of the Panel 41 41 """ 42 42 BasicPage.__init__(self, parent, color=color) 43 self.populate_box(m_dict) 44 43 45 44 ## draw sizer 46 45 self._fill_data_sizer() … … 68 67 #create a default data for an empty panel 69 68 self.create_default_data() 70 69 71 70 def enable_fit_button(self): 72 71 """ … … 1088 1087 call back for model selection 1089 1088 """ 1090 # if we're just clearing the box then do nothing1091 if self.model_box.GetCount() == 0 or \1092 self.model_box.GetStringSelection() == '':1093 return1094 1095 1096 1089 self.Show(False) 1097 1090 copy_flag = False 1098 1091 is_poly_enabled = None 1099 1092 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 1108 1100 self._on_select_model_helper() 1109 1101 self.set_model_param_sizer(self.model) … … 1124 1116 1125 1117 self.state.structurecombobox = self.structurebox.GetLabel() 1126 self.state.formfactorcombobox = self. model_box.GetStringSelection()1118 self.state.formfactorcombobox = self.formfactorbox.GetLabel() 1127 1119 self.enable_fit_button() 1128 1120 if self.model != None: … … 1183 1175 wx.PostEvent(self.parent, new_event) 1184 1176 #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) 1194 1188 # when select a model only from guictr/button 1195 1189 if is_poly_enabled != None: … … 1822 1816 self.dI_idata.Enable(True) 1823 1817 1824 #self.formfactorbox.Enable()1818 self.formfactorbox.Enable() 1825 1819 self.structurebox.Enable() 1826 1820 data_name = self.data.name
Note: See TracChangeset
for help on using the changeset viewer.