Ignore:
Timestamp:
Nov 16, 2018 6:44:40 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:
64b9e61
Parents:
ecc5d043
Message:

Added tooltip on COnstraints table.
Added "validate" parameter to Constraint, allowing for looser validation
of complex, multi-fitpage setups.

File:
1 edited

Legend:

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

    recc5d043 r09e0c32  
    714714        # what is the parameter to constraint to? 
    715715        constraint.value = param_used 
     716 
     717        # Should the new constraint be validated? 
     718        constraint.validate = mc_widget.validate 
    716719 
    717720        # Create a new item and add the Constraint object as a child 
     
    843846        constraint.value_ex = updated_param_used 
    844847        constraint.value = param_used 
     848        # Should the new constraint be validated? 
     849        constraint.validate = mc_widget.validate 
    845850 
    846851        # Which row is the constrained parameter in? 
     
    36843689                value_ex = constraint.value_ex 
    36853690                param = constraint.param 
    3686  
    3687                 cons = (value, param, value_ex, func) 
    3688  
    3689             param_list.append([param_name, param_checked, param_value, param_error, param_min, param_max, cons]) 
     3691                validate = constraint.validate 
     3692 
     3693                cons = (value, param, value_ex, validate, func) 
     3694 
     3695            param_list.append([param_name, param_checked, param_value,param_error, param_min, param_max, cons]) 
    36903696 
    36913697        def gatherPolyParams(row): 
     
    39353941            # constraints 
    39363942            cons = param_dict[param_name][4+ioffset] 
    3937             if cons is not None and len(cons)==4: 
     3943            if cons is not None and len(cons)==5: 
    39383944                value = cons[0] 
    39393945                param = cons[1] 
    39403946                value_ex = cons[2] 
    3941                 function = cons[3] 
     3947                validate = cons[3] 
     3948                function = cons[4] 
    39423949                constraint = Constraint() 
    39433950                constraint.value = value 
     
    39453952                constraint.param = param 
    39463953                constraint.value_ex = value_ex 
     3954                constraint.validate = validate 
    39473955                self.addConstraintToRow(constraint=constraint, row=row) 
    39483956 
Note: See TracChangeset for help on using the changeset viewer.