Changeset 99d2aeb in sasview for src/sans/guiframe/CategoryManager.py
- Timestamp:
- Apr 26, 2014 5:56:55 PM (11 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:
- fdb900b
- Parents:
- 116e1a7
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sans/guiframe/CategoryManager.py
r27b7acc r99d2aeb 184 184 Expands lists on the GUI 185 185 """ 186 ## This method loops through all the models in the category by model 187 ## list and for each one converts the dictionary item to a string 188 ## which has of course two terms: the model and the category (in that 189 ## order). The text string however directly reads the quotes, brackets, 190 ## and encoding term (u in our case) and does not understand them 191 ## as dictionary and list separators. Thus we then have to strip those 192 ## out. Also note the text control box, cat_list, has already been made into 193 ## a two column list with a check box. 194 ## 195 ## This works but is ugly to me (should not have to manually strip). 196 ## had to add the u stripping for the json encoding 197 ## 198 ## - PDB April 26, 2014 199 ## 186 200 self.cat_list.DeleteAllItems() 187 201 model_name_list = [model for model in self.by_model_dict] … … 192 206 self.cat_list.SetStringItem(index, 1, \ 193 207 str(self.by_model_dict[model]).\ 208 replace("u'","").\ 194 209 replace("'","").\ 195 210 replace("[","").\ … … 342 357 self.by_model_dict[model].append(category) 343 358 self.model_enabled_dict[model] = enabled 359 print self.master_category_dict 360 print self.by_model_dict 361 print self.model_enabled_dict 344 362 345 363 def _regenerate_master_dict(self):
Note: See TracChangeset
for help on using the changeset viewer.