diff options
Diffstat (limited to 'client/widgets/altcombobox.cc')
-rw-r--r-- | client/widgets/altcombobox.cc | 15 |
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); } |