diff options
author | deva <deva> | 2008-12-08 08:52:46 +0000 |
---|---|---|
committer | deva <deva> | 2008-12-08 08:52:46 +0000 |
commit | c18428aa59e693af9debf9f760f52e4c40d2fa47 (patch) | |
tree | 11dfd7e308aabb3c0682f1eb16592863d55fe5e4 /client/widgets/altcombobox.cc | |
parent | d3e13904af4a2ee2c89335afed0a9407f28ba892 (diff) |
Fixed som enabling/disabling of altcombobox innerwidget in setValue.
Diffstat (limited to 'client/widgets/altcombobox.cc')
-rw-r--r-- | client/widgets/altcombobox.cc | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/client/widgets/altcombobox.cc b/client/widgets/altcombobox.cc index e3b1eb7..01fd36f 100644 --- a/client/widgets/altcombobox.cc +++ b/client/widgets/altcombobox.cc @@ -143,18 +143,9 @@ void AltComboBox::setValue(QString value) if(combobox->isValid() == false) { // Combobox contain idx == -1 (invalid) if value didn't exist. combobox->setValue(altvalue); - printf("Value %s not in combo.\n", value.toStdString().c_str()); - if(innerwidget) { - printf("\tSetting value on inner widget (%s) to \"%s\".\n", innerwidget->getName().toStdString().c_str(), value.toStdString().c_str()); - printf("\told value (%s).\n", innerwidget->getValue().toStdString().c_str()); innerwidget->setValue(value); - } else { - printf("Could not set value in AltComboBox, no innerwidget!\n"); } - altframe->setEnabled(true); - } else { - altframe->setEnabled(false); } } @@ -169,12 +160,7 @@ void AltComboBox::onValueChange(int index) void AltComboBox::onValueChange(const QString &text) { - int index = combobox->findText(text); - if(index != -1 && combobox->itemData(index).toString() == altvalue) { - altframe->setEnabled(true); - } else { - altframe->setEnabled(false); - } + onValueChange(combobox->findText(text)); } void AltComboBox::enable() |