summaryrefslogtreecommitdiff
path: root/client/widgets/altcombobox.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/widgets/altcombobox.cc')
-rw-r--r--client/widgets/altcombobox.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/client/widgets/altcombobox.cc b/client/widgets/altcombobox.cc
index 1dc874f..e3b1eb7 100644
--- a/client/widgets/altcombobox.cc
+++ b/client/widgets/altcombobox.cc
@@ -109,6 +109,7 @@ AltComboBox::AltComboBox(QDomNode &node, MacroWindow *macrowindow)
}
connect(combobox, SIGNAL(currentIndexChanged(int)), this, SLOT(onValueChange(int)));
+ connect(combobox, SIGNAL(editTextChanged(const QString&)), this, SLOT(onValueChange(const QString&)));
layout()->setContentsMargins(0,0,0,0);
altframe->layout()->setContentsMargins(0,0,0,0);
@@ -166,6 +167,16 @@ 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);
+ }
+}
+
void AltComboBox::enable()
{
setEnabled(true);