Skip to content
Permalink
Browse files
fixed #6227
  • Loading branch information
volaya committed Dec 8, 2012
1 parent 7841975 commit a2997be05c6292521ab2765a7a1f4f70c96e82f4
@@ -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()))
@@ -16,6 +16,7 @@
* *
***************************************************************************
"""
from PyQt4 import QtGui

__author__ = 'Victor Olaya'
__date__ = 'August 2012'
@@ -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

@@ -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

0 comments on commit a2997be

Please sign in to comment.