Skip to content


Added value range control to ParameterNumber
Browse files Browse the repository at this point in the history
git-svn-id: 881b9c09-3ef8-f3c2-ec3d-21d735c97f4d
  • Loading branch information committed Mar 11, 2012
1 parent 9321752 commit 6cb5ddd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/sextante/parameters/
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,14 @@ def __init__(self, name="", description="", minValue = None, maxValue = None, de

def setValue(self, n):
self.value = float(n)
value = float(n)
if self.min:
if value < self.min:
return False
if self.max:
if value > self.max:
return False
self.value = value
return True
return False
Expand Down

0 comments on commit 6cb5ddd

Please sign in to comment.