Skip to content
Permalink
Browse files

[processing] fixes for representing input values in history

  • Loading branch information
volaya committed Nov 6, 2015
1 parent de15403 commit b3b33799d98bc0bd0f452eafee83bfc953615fb2
Showing with 5 additions and 4 deletions.
  1. +5 −4 python/plugins/processing/core/parameters.py
@@ -39,7 +39,7 @@

def getParameterFromString(s):
tokens = s.split("|")
params = [t if unicode(t) != "None" else None for t in tokens[1:]]
params = [t if unicode(t) != unicode(None) else None for t in tokens[1:]]
clazz = getattr(sys.modules[__name__], tokens[0])
return clazz(*params)

@@ -484,7 +484,7 @@ def setValue(self, text):
return False

def getValueAsCommandLineParameter(self):
return '"' + unicode(self.value) + '"'
return '"' + unicode(self.value) + '"' if self.value is not None else unicode(None)


class ParameterRaster(ParameterDataObject):
@@ -605,8 +605,9 @@ def setValue(self, obj):
return True

def getValueAsCommandLineParameter(self):
return '"' + unicode(self.value.replace(ParameterString.NEWLINE,
return ('"' + unicode(self.value.replace(ParameterString.NEWLINE,
ParameterString.ESCAPED_NEWLINE)) + '"'
if self.value is not None else unicode(None))


class ParameterTable(ParameterDataObject):
@@ -688,7 +689,7 @@ def __init__(self, name='', description='', parent=None, datatype=-1,
self.datatype = int(datatype)

def getValueAsCommandLineParameter(self):
return '"' + unicode(self.value) + '"'
return '"' + unicode(self.value) + '"' if self.value is not None else unicode(None)

def setValue(self, value):
if value is None:

0 comments on commit b3b3379

Please sign in to comment.
You can’t perform that action at this time.