Changes in / [b6f9c9f:6f4a7c17] in sasview


Ignore:
File:
1 edited

Legend:

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

    r58a8f76 r1f4d708  
    13671367            except Exception: 
    13681368                logger.error(traceback.format_exc()) 
    1369             selection = self._find_polyfunc_selection(disp_model) 
     1369            index, selection = self._find_polyfunc_selection(disp_model) 
    13701370            for list in self.fittable_param: 
    13711371                if list[1] == key and list[7] is not None: 
    1372                     list[7].SetSelection(selection) 
     1372                    list[7].SetSelection(index) 
    13731373                    # For the array disp_model, set the values and weights 
    1374                     if selection == 1: 
     1374                    if selection == 'array': 
    13751375                        disp_model.set_weights(self.values[key], 
    13761376                                               self.weights[key]) 
     
    13851385                            logger.error(traceback.format_exc()) 
    13861386            # For array, disable all fixed params 
    1387             if selection == 1: 
     1387            if selection == 'array': 
    13881388                for item in self.fixed_param: 
    13891389                    if item[1].split(".")[0] == key.split(".")[0]: 
     
    26682668    def _find_polyfunc_selection(self, disp_func=None): 
    26692669        """ 
    2670         FInd Comboox selection from disp_func 
     2670        Find Combobox selection from disp_func 
    26712671 
    26722672        :param disp_function: dispersion distr. function 
     
    26752675        if disp_func is not None: 
    26762676            try: 
    2677                 return POLYDISPERSITY_MODELS.values().index(disp_func.__class__) 
     2677                return (list(POLYDISPERSITY_MODELS).index(disp_func.type), 
     2678                       disp_func.type) 
    26782679            except ValueError: 
    26792680                pass  # Fall through to default class 
    2680         return POLYDISPERSITY_MODELS.keys().index('gaussian') 
     2681        return (list(POLYDISPERSITY_MODELS).index('gaussian'), 'gaussian') 
    26812682 
    26822683    def on_reset_clicked(self, event): 
Note: See TracChangeset for help on using the changeset viewer.