Skip to content
Permalink
Browse files

Merge pull request #3166 from nirvn/fix_processing_refactor_fields

[processing] fix missing quotes to field name in refactor fields
  • Loading branch information
alexbruy committed Jun 10, 2016
2 parents 37598bd + 14342ce commit 895b9558b53956f7f6ebe3eedf5cfd834c84363c
Showing with 5 additions and 2 deletions.
  1. +5 −2 python/plugins/processing/algs/qgis/ui/FieldsMappingPanel.py
@@ -220,7 +220,7 @@ def newField(self, field=None):
'type': field.type(),
'length': field.length(),
'precision': field.precision(),
'expression': field.name()}
'expression': QgsExpression.quotedColumnRef(field.name())}

def loadLayerFields(self, layer):
self.beginResetModel()
@@ -292,7 +292,10 @@ def setModelData(self, editor, model, index):

elif fieldType == QgsExpression:
(value, isExpression, isValid) = editor.currentField()
model.setData(index, value)
if isExpression is True:
model.setData(index, value)
else:
model.setData(index, QgsExpression.quotedColumnRef(value))

else:
QStyledItemDelegate.setModelData(self, editor, model, index)

0 comments on commit 895b955

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