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/MultiConstraint.py

    rbaeac95 r09e0c32  
    3131        self.params = params 
    3232        self.parent = parent 
     33        # Text of the constraint 
    3334        self.function = None 
     35        # Should this constraint be validated? 
     36        self.validate = True 
    3437 
    3538        self.input_constraint = constraint 
    3639        if self.input_constraint is not None: 
    3740            variable = constraint.value 
    38             #variable = func[func.index('.')+1:] 
    3941            self.function = constraint.func 
    4042            self.params.append(variable) 
    4143            self.model_name = constraint.value_ex 
     44            # Passed constraint may be too complex for simple validation 
     45            self.validate = constraint.validate 
    4246        else: 
    4347            self.model_name = self.params[1] 
     
    97101        Add visual cues when formula is incorrect 
    98102        """ 
     103        # Don't validate if requested 
     104        if not self.validate: return 
     105 
    99106        formula_is_valid = False 
    100107        formula_is_valid = self.validateConstraint(self.txtConstraint.text()) 
Note: See TracChangeset for help on using the changeset viewer.