Skip to content
Permalink
Browse files

Fix #12183 - avoid error message in fieldsmapper when no field type s…

…elected
  • Loading branch information
arnaud-morvan committed Feb 11, 2015
1 parent f76d730 commit ed94aff17d2ddd65c98c5a67f2196da4fa45bbf6
Showing with 3 additions and 1 deletion.
  1. +3 −1 python/plugins/processing/algs/qgis/ui/FieldsMappingPanel.py
@@ -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
@@ -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:

0 comments on commit ed94aff

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