summaryrefslogtreecommitdiff
path: root/client/widgets/altcombobox.cc
diff options
context:
space:
mode:
authordeva <deva>2010-08-19 09:04:47 +0000
committerdeva <deva>2010-08-19 09:04:47 +0000
commit7914500c96ebe2106716a001ca2b93594d3c07a5 (patch)
tree025cf3dcbba673df9dcca9fa5864135a328209c8 /client/widgets/altcombobox.cc
parent145bc8467b9f4271ca15654bc4bc6f7a8bc816b6 (diff)
Fixed problems with eventOnChange.
Diffstat (limited to 'client/widgets/altcombobox.cc')
-rw-r--r--client/widgets/altcombobox.cc15
1 files changed, 10 insertions, 5 deletions
diff --git a/client/widgets/altcombobox.cc b/client/widgets/altcombobox.cc
index fac2610..6146624 100644
--- a/client/widgets/altcombobox.cc
+++ b/client/widgets/altcombobox.cc
@@ -188,22 +188,25 @@ void AltComboBox::onValueChange(int index)
altvalue.toStdString().c_str());
if(cmb->itemData(index).toString() == altvalue) {
- // altframe->setEnabled(true);
+
altframerepl->setVisible(false);
frame->layout()->removeWidget(altframerepl);
frame->layout()->addWidget(altframe);
altframe->setVisible(true);
+
} else {
- // altframe->setEnabled(false);
+
altframe->setVisible(false);
frame->layout()->removeWidget(altframe);
frame->layout()->addWidget(altframerepl);
altframerepl->setVisible(true);
+
}
- eventOnChange(true);
+ emit eventOnChange(true);
+ innerwidget->runEventOnChange();
}
void AltComboBox::onValueChange(const QString &text)
@@ -214,8 +217,8 @@ void AltComboBox::onValueChange(const QString &text)
void AltComboBox::onChildChange()
{
+ emit eventOnChange(true);
emit wasChanged();
- eventOnChange(true);
}
bool AltComboBox::setKeyboardFocus()
@@ -230,6 +233,8 @@ bool AltComboBox::setKeyboardFocus()
void AltComboBox::setWdgValid(bool valid)
{
+ DEBUG(altcombobox, "Set valid(%s)", valid?"true":"false");
+
QPalette palette;
if(valid) {
@@ -242,5 +247,5 @@ void AltComboBox::setWdgValid(bool valid)
frame->setPalette(palette);
combobox->qwidget()->setPalette(palette);
- if(innerwidget) innerwidget->setWdgValid(valid);
+ // if(innerwidget) innerwidget->setWdgValid(valid);
}