summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI/QtFormWidget.cpp')
-rw-r--r--Swift/QtUI/QtFormWidget.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Swift/QtUI/QtFormWidget.cpp b/Swift/QtUI/QtFormWidget.cpp
index 9b213cf..117696d 100644
--- a/Swift/QtUI/QtFormWidget.cpp
+++ b/Swift/QtUI/QtFormWidget.cpp
@@ -60,7 +60,7 @@ QListWidget* QtFormWidget::createList(FormField::ref field) {
std::vector<bool> selected;
foreach (FormField::Option option, field->getOptions()) {
listWidget->addItem(option.label.c_str());
- if (field->getType() == FormField::ListMultiType) {
+ if (field->getType() == FormField::ListSingleType) {
selected.push_back(!field->getValues().empty() && option.value == field->getValues()[0]);
}
else if (field->getType() == FormField::ListMultiType) {
@@ -170,7 +170,7 @@ Form::ref QtFormWidget::getCompletedForm() {
resultField->addValue(field->getOptions()[listWidget->row(item)].value);
}
}
- field->setName(field->getName());
+ resultField->setName(field->getName());
result->addField(resultField);
}
return result;