Changes in / [5223602:f2261c2] in sasview
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/basepage.py
r5223602 rf22b43c 1099 1099 self.Refresh() 1100 1100 1101 def get_cat_combo_box_pos(self, state): 1102 """ 1103 Iterate through the categories to find the structurefactor 1104 :return: combo_box_position 1105 """ 1106 for key, value in self.master_category_dict.iteritems(): 1107 for list_item in value: 1108 if state.formfactorcombobox in list_item: 1109 return self.categorybox.Items.index(key) 1110 1101 1111 def reset_page_helper(self, state): 1102 1112 """ … … 1145 1155 category_pos = int(state.categorycombobox) 1146 1156 except: 1157 state.formfactorcombobox = unicode(state.formfactorcombobox.lower()) 1158 state.categorycombobox = unicode(state.categorycombobox) 1147 1159 category_pos = 0 1148 for ind_cat in range(self.categorybox.GetCount()): 1149 if self.categorybox.GetString(ind_cat) == \ 1150 state.categorycombobox: 1151 category_pos = int(ind_cat) 1152 break 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) 1153 1166 1154 1167 self.categorybox.Select(category_pos) … … 1171 1184 structfactor_pos = int(state.structurecombobox) 1172 1185 except: 1173 structfactor_pos = 0 1174 for ind_struct in range(self.structurebox.GetCount()): 1175 if self.structurebox.GetString(ind_struct) == \ 1176 (state.structurecombobox): 1177 structfactor_pos = int(ind_struct) 1178 break 1186 if state.structurecombobox is not None: 1187 structfactor_pos = 0 1188 state.structurecombobox = unicode(state.structurecombobox) 1189 for ind_struct in range(self.structurebox.GetCount()): 1190 if self.structurebox.GetString(ind_struct) == \ 1191 (state.structurecombobox): 1192 structfactor_pos = int(ind_struct) 1193 break 1179 1194 1180 1195 self.structurebox.SetSelection(structfactor_pos)
Note: See TracChangeset
for help on using the changeset viewer.