Skip to content

Commit

Permalink
fixed #6227
Browse files Browse the repository at this point in the history
  • Loading branch information
volaya committed Dec 8, 2012
1 parent 7841975 commit a2997be
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion python/plugins/sextante/gui/AlgorithmExecutionDialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def setParamValue(self, param, widget):
value.append(options[index])
return param.setValue(value)
elif isinstance(param, (ParameterNumber, ParameterFile, ParameterCrs, ParameterExtent)):
return param.setValue(widget.getValue())
return param.setValue(widget.getValue())
elif isinstance(param, ParameterString):
if param.multiline:
return param.setValue(unicode(widget.toPlainText()))
Expand Down
11 changes: 6 additions & 5 deletions python/plugins/sextante/parameters/ParameterNumber.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* *
***************************************************************************
"""
from PyQt4 import QtGui

__author__ = 'Victor Olaya'
__date__ = 'August 2012'
Expand All @@ -38,7 +39,7 @@ def __init__(self, name="", description="", minValue = None, maxValue = None, de
except:
self.default = default
self.isInteger = False
self.min = minValue
self.min = minValue
self.max = maxValue
self.value = None

Expand All @@ -50,11 +51,11 @@ def setValue(self, n):
if (float(n) - int(float(n)) == 0):
value = int(float(n))
else:
value = float(n)
if self.min:
if value < self.min:
value = float(n)
if self.min is not None:
if value < self.min:
return False
if self.max:
if self.max is not None:
if value > self.max:
return False
self.value = value
Expand Down

0 comments on commit a2997be

Please sign in to comment.