Changeset 7303357 in sasview for src/sas/sasgui/perspectives


Ignore:
Timestamp:
Dec 1, 2017 8:03:15 AM (7 years ago)
Author:
GitHub <noreply@…>
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:
79c9ce5
Parents:
19b5c886 (diff), eee94bf (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Paul Kienzle <pkienzle@…> (12/01/17 08:03:15)
git-committer:
GitHub <noreply@…> (12/01/17 08:03:15)
Message:

Merge pull request #131 from SasView?/ticket1007

Fixing ticket1007 and hopefully other similar sources of error

Location:
src/sas/sasgui/perspectives
Files:
1 added
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/perspectives/fitting/basepage.py

    r3bd677b reee94bf  
    16431643                        if item_page[2].__class__.__name__ == "ComboBox": 
    16441644                            if item_page_info[2] in self.model.fun_list: 
    1645                                 fun_val = self.model.fun_list[item_page_info[2]] 
     1645                                fun_val = self.model.fun_list.index(item_page_info[2]) 
    16461646                                self.model.setParam(item_page_info[1], fun_val) 
    16471647                    if item_page[3] is not None: 
     
    16871687                selection = value 
    16881688                if value in self.model.fun_list: 
    1689                     selection = self.model.fun_list[value] 
     1689                    selection = self.model.fun_list.index(value) 
    16901690                item_page[2].SetValue(selection) 
    16911691                self.model.setParam(param_name, selection) 
     
    33653365                    if item[2].__class__.__name__ == "ComboBox": 
    33663366                        if content[name][1] in self.model.fun_list: 
    3367                             fun_val = self.model.fun_list[content[name][1]] 
     3367                            fun_val = self.model.fun_list.index(content[name][1]) 
    33683368                            self.model.setParam(name, fun_val) 
    33693369                    try: 
     
    34153415                        if item[2].__class__.__name__ == "ComboBox": 
    34163416                            if value[0] in self.model.fun_list: 
    3417                                 fun_val = self.model.fun_list[value[0]] 
     3417                                fun_val = self.model.fun_list.index(value[0]) 
    34183418                                self.model.setParam(name, fun_val) 
    34193419                                # save state 
  • src/sas/sasgui/perspectives/fitting/fitpage.py

    r3bd677b rbfeb823  
    17261726                and not self.temp_multi_functional: 
    17271727            return None 
    1728         # Get the func name list 
    1729         list = self.model.fun_list 
    1730         if len(list) == 0: 
    1731             return None 
    1732         # build function (combo)box 
    1733         ind = 0 
    1734         while(ind < len(list)): 
    1735             for key, val in list.items(): 
    1736                 if val == ind: 
    1737                     fun_box.Append(key, val) 
    1738                     break 
    1739             ind += 1 
     1728        for index, choice in enumerate(self.model.fun_list): 
     1729            fun_box.Append(choice, index) 
    17401730 
    17411731    def _on_select_accuracy(self, event): 
     
    17651755        value = fun_box.GetValue() 
    17661756        if value in self.model.fun_list: 
    1767             fun_val = self.model.fun_list[value] 
     1757            fun_val = self.model.fun_list.index(value) 
    17681758 
    17691759        self.model.setParam(name, fun_val) 
Note: See TracChangeset for help on using the changeset viewer.