Ignore:
Timestamp:
Nov 13, 2018 5:25:48 AM (5 years ago)
Author:
Piotr Rozyczko <piotr.rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
baeac95
Parents:
133812c7
Message:

Added C&S tab serialization.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/Perspectives/Fitting/FittingWidget.py

    r133812c7 re5ae812  
    19521952        Emits plotRequestedSignal for all plots found in the given model under the provided item name. 
    19531953        """ 
    1954         fitpage_name = "" if self.tab_id is None else "M"+str(self.tab_id) 
     1954        fitpage_name = self.kernel_module.name 
    19551955        plots = GuiUtils.plotsFromFilename(item_name, item_model) 
    19561956        # Has the fitted data been shown? 
     
    35243524        param_list.append(['data_name', filenames]) 
    35253525        param_list.append(['data_id', data_ids]) 
     3526        param_list.append(['tab_name', self.modelName()]) 
    35263527        # option tab 
    35273528        param_list.append(['q_range_min', str(self.q_range_min)]) 
     
    35963597            except: 
    35973598                pass 
    3598  
    3599             param_list.append([param_name, param_checked, param_value, param_error, param_min, param_max]) 
     3599            # Do we have any constraints on this parameter? 
     3600            constraint = self.getConstraintForRow(row) 
     3601            cons = () 
     3602            if constraint is not None: 
     3603                value = constraint.value 
     3604                func = constraint.func 
     3605                cons = (value, func) 
     3606 
     3607            param_list.append([param_name, param_checked, param_value, param_error, param_min, param_max, cons]) 
    36003608 
    36013609        def gatherPolyParams(row): 
     
    37053713                self.updateMultiplicityCombo(multip) 
    37063714 
     3715        if 'tab_name' in line_dict.keys(): 
     3716            self.kernel_module.name = line_dict['tab_name'][0] 
    37073717        if 'polydisperse_params' in line_dict.keys(): 
    37083718            self.chkPolydispersity.setChecked(line_dict['polydisperse_params'][0]=='True') 
     
    38273837            ioffset = 0 
    38283838            joffset = 0 
    3829             if len(param_dict[param_name])>4: 
     3839            if len(param_dict[param_name])>5: 
    38303840                # error values are not editable - no need to update 
    38313841                ioffset = 1 
     
    38403850            except: 
    38413851                pass 
     3852 
     3853            # constraints 
     3854            cons = param_dict[param_name][4+ioffset] 
     3855            if cons is not None and cons: 
     3856                value = cons[0] 
     3857                function = cons[1] 
     3858                constraint = Constraint() 
     3859                constraint.value = value 
     3860                constraint.func = function 
     3861                self.addConstraintToRow(constraint=constraint, row=row) 
    38423862 
    38433863            self.setFocus() 
Note: See TracChangeset for help on using the changeset viewer.