Navigation Menu

Skip to content

Commit

Permalink
Fix #12183 - avoid error message in fieldsmapper when no field type s…
Browse files Browse the repository at this point in the history
…elected
  • Loading branch information
arnaud-morvan committed Feb 11, 2015
1 parent f76d730 commit ed94aff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion python/plugins/processing/algs/qgis/ui/FieldsMappingPanel.py
Expand Up @@ -132,7 +132,7 @@ def data(self, index, role=QtCore.Qt.DisplayRole):

fieldType = column_def['type']
if fieldType == QtCore.QVariant.Type:
if value == 0:
if value == QtCore.QVariant.Invalid:
return ''
return self.fieldTypes[value]
return value
Expand Down Expand Up @@ -277,6 +277,8 @@ def setModelData(self, editor, model, index):
fieldType = FieldsMappingModel.columns[column]['type']
if fieldType == QtCore.QVariant.Type:
value = editor.itemData(editor.currentIndex())
if value is None:
value = QtCore.QVariant.Invalid
model.setData(index, value)

elif fieldType == QgsExpression:
Expand Down

0 comments on commit ed94aff

Please sign in to comment.