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