Skip to content
Permalink
Browse files

[Processing] fixed #13790 (issue saving config option)

  • Loading branch information
volaya committed Nov 8, 2015
1 parent ac01d48 commit f0bbb88944af3e13f828ebe00743f5e3dd7f7155
@@ -255,7 +255,7 @@ def checkFileOrFolder(v):

def setValue(self, value):
self.validator(value)
self._value = value
self.value = value

def read(self):
qsettings = QSettings()
@@ -215,25 +215,15 @@ def setEditorData(self, editor, index):
if setting.valuetype == Setting.SELECTION:
editor.setCurrentIndex(editor.findText(value))
else:
if isinstance(value, (int, long)):
editor.setValue(value)
elif isinstance(value, float):
editor.setValue(value)
elif isinstance(value, (str, unicode)):
editor.setText(value)
editor.setText(value)

def setModelData(self, editor, model, index):
value = self.convertValue(index.model().data(index, Qt.EditRole))
setting = index.model().data(index, Qt.UserRole)
if setting.valuetype == Setting.SELECTION:
model.setData(index, editor.currentText(), Qt.EditRole)
else:
if isinstance(value, (int, long)):
model.setData(index, editor.value(), Qt.EditRole)
elif isinstance(value, float):
model.setData(index, editor.value(), Qt.EditRole)
elif isinstance(value, (str, unicode)):
model.setData(index, editor.text(), Qt.EditRole)
model.setData(index, editor.text(), Qt.EditRole)

def sizeHint(self, option, index):
return QSpinBox().sizeHint()

0 comments on commit f0bbb88

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