diff options
-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() |