Ignore:
File:
1 edited

Legend:

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

    r3b3b40b r14ec91c5  
    114114 
    115115        # 3. parameter name should be a separate word, but can have "()[]*+-/ " around 
    116         #valid_neighbours = "()[]*+-/ " 
    117         #start_loc = parameter_string_start -1 
    118         #end_loc = parameter_string_end 
    119         #if not any([constraint_text[start_loc] == ch for ch in valid_neighbours]): 
    120         #    return False 
    121         #if end_loc < len(constraint_text): 
    122         #    if not any([constraint_text[end_loc] == ch for ch in valid_neighbours]): 
    123         #        return False 
     116        valid_neighbours = "()[]*+-/ " 
     117        start_loc = parameter_string_start -1 
     118        end_loc = parameter_string_end 
     119        if not any([constraint_text[start_loc] == ch for ch in valid_neighbours]): 
     120            return False 
     121        if end_loc < len(constraint_text): 
     122            if not any([constraint_text[end_loc] == ch for ch in valid_neighbours]): 
     123                return False 
    124124 
    125125        # 4. replace parameter name with "1" and try to evaluate the expression 
Note: See TracChangeset for help on using the changeset viewer.