Changeset ee6ab94 in sasview
- Timestamp:
- Nov 30, 2017 8:31:20 AM (7 years ago)
- Branches:
- master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- c66a0bb
- Parents:
- 0be6b6b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/perspectives/fitting/basepage.py
r0be6b6b ree6ab94 1643 1643 if item_page[2].__class__.__name__ == "ComboBox": 1644 1644 if item_page_info[2] in self.model.fun_list: 1645 fun_val = self.model.fun_list[item_page_info[2]] 1645 # to fix: fun_list is not a dictionary, but a tuple 1646 # so the following line (commented) will fail 1647 # fun_val = self.model.fun_list[item_page_info[2]] 1648 # I guess the following should work, but 1649 # could not test as I don't know when this 1650 # part is used by SasView. 1651 fun_val = self.model.fun_list.index(item_page_info[2]) 1646 1652 self.model.setParam(item_page_info[1], fun_val) 1647 1653 if item_page[3] is not None: … … 1687 1693 selection = value 1688 1694 if value in self.model.fun_list: 1689 selection = self.model.fun_list[value] 1695 # to fix: fun_list is not a dictionary, so 1696 # I commented the following original line 1697 #selection = self.model.fun_list[value] 1698 # and replaced by this. 1699 # I think this should work, but could not test it. 1700 selection = self.model.fun_list.index(value) 1690 1701 item_page[2].SetValue(selection) 1691 1702 self.model.setParam(param_name, selection) … … 3365 3376 if item[2].__class__.__name__ == "ComboBox": 3366 3377 if content[name][1] in self.model.fun_list: 3367 fun_val = self.model.fun_list[content[name][1]] 3378 # to fix: fun_list is not a dictionary, but a tuple 3379 # so the following line (commented) will fail 3380 # fun_val = self.model.fun_list[content[name][1]] 3381 # I guess the following should work, but 3382 # could not test as I don't know when this 3383 # part is used by SasView. 3384 fun_val = self.model.fun_list.index(content[name][1]) 3368 3385 self.model.setParam(name, fun_val) 3369 3386 try: … … 3415 3432 if item[2].__class__.__name__ == "ComboBox": 3416 3433 if value[0] in self.model.fun_list: 3417 self.model.setParam(name, 0) 3434 # Fixed: fun_list not a dictionary! 3435 # Arrives here when spherical_sld model is 3436 # selected and number of shells modified. 3437 fun_val = self.model.fun_list.index(value[0]) 3438 self.model.setParam(name, fun_val) 3418 3439 # save state 3419 3440 try:
Note: See TracChangeset
for help on using the changeset viewer.