Changeset 0633048 in sasview for src/sas/sasgui/perspectives/fitting/basepage.py
- Timestamp:
- Dec 9, 2016 1:52:27 PM (8 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, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 8aec639
- Parents:
- 9eb8fae
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/basepage.py
ra321c52 r0633048 1156 1156 self._show_combox_helper() 1157 1157 # select the current model 1158 try: 1159 # to support older version 1160 category_pos = int(state.categorycombobox) 1161 except: 1162 state._convert_to_sasmodels() 1163 state.categorycombobox = unicode(state.categorycombobox) 1164 if state.categorycombobox in self.categorybox.Items: 1165 category_pos = self.categorybox.Items.index( 1166 state.categorycombobox) 1167 else: 1168 # Look in master list for model name (model.lower) 1169 category_pos = self.get_cat_combo_box_pos(state) 1158 state._convert_to_sasmodels() 1159 state.categorycombobox = unicode(state.categorycombobox) 1160 if state.categorycombobox in self.categorybox.Items: 1161 category_pos = self.categorybox.Items.index( 1162 state.categorycombobox) 1163 else: 1164 # Look in master list for model name (model.lower) 1165 category_pos = self.get_cat_combo_box_pos(state) 1170 1166 1171 1167 self.categorybox.Select(category_pos) 1172 1168 self._show_combox(None) 1173 try: 1174 # to support older version 1175 formfactor_pos = int(state.formfactorcombobox) 1176 except: 1177 if self.categorybox.GetValue() == 'Customized Models' \ 1178 and '[plug-in]' not in state.formfactorcombobox: 1179 state.formfactorcombobox = \ 1180 '[plug-in] ' + state.formfactorcombobox 1181 formfactor_pos = 0 1182 for ind_form in range(self.formfactorbox.GetCount()): 1183 if self.formfactorbox.GetString(ind_form) == \ 1184 (state.formfactorcombobox): 1185 formfactor_pos = int(ind_form) 1169 if self.categorybox.GetValue() == 'Customized Models' \ 1170 and '[plug-in]' not in state.formfactorcombobox: 1171 state.formfactorcombobox = \ 1172 '[plug-in] ' + state.formfactorcombobox 1173 formfactor_pos = 0 1174 for ind_form in range(self.formfactorbox.GetCount()): 1175 if self.formfactorbox.GetString(ind_form) == \ 1176 (state.formfactorcombobox): 1177 formfactor_pos = int(ind_form) 1178 break 1179 1180 self.formfactorbox.Select(formfactor_pos) 1181 1182 structfactor_pos = 0 1183 if state.structurecombobox is not None: 1184 state.structurecombobox = unicode(state.structurecombobox) 1185 for ind_struct in range(self.structurebox.GetCount()): 1186 if self.structurebox.GetString(ind_struct) == \ 1187 (state.structurecombobox): 1188 structfactor_pos = int(ind_struct) 1186 1189 break 1187 1188 self.formfactorbox.Select(formfactor_pos)1189 1190 structfactor_pos = 01191 try:1192 # to support older version1193 structfactor_pos = int(state.structurecombobox)1194 except:1195 if state.structurecombobox is not None:1196 state.structurecombobox = unicode(state.structurecombobox)1197 for ind_struct in range(self.structurebox.GetCount()):1198 if self.structurebox.GetString(ind_struct) == \1199 (state.structurecombobox):1200 structfactor_pos = int(ind_struct)1201 break1202 1190 1203 1191 self.structurebox.SetSelection(structfactor_pos)
Note: See TracChangeset
for help on using the changeset viewer.