forked from osmocom/wireshark
Display Filter Expression dialog updates.
De Morganize an expression. Clear the selection at start. Selecting the first item (104apci) seems to confuse people. Change-Id: I8fcd1f068f1801042a2658940175b46bdfb2b462 Reviewed-on: https://code.wireshark.org/review/13647 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
This commit is contained in:
parent
6641987c89
commit
8834e8f894
|
@ -128,9 +128,10 @@ DisplayFilterExpressionDialog::DisplayFilterExpressionDialog(QWidget *parent) :
|
|||
connect(ui->rangeLineEdit, SIGNAL(textEdited(QString)), this, SLOT(updateWidgets()));
|
||||
|
||||
// Trigger updateWidgets
|
||||
if (ui->fieldTreeWidget->topLevelItemCount() > 0) {
|
||||
ui->fieldTreeWidget->topLevelItem(0)->setSelected(true);
|
||||
}
|
||||
ui->fieldTreeWidget->selectionModel()->clear();
|
||||
// if (ui->fieldTreeWidget->topLevelItemCount() > 0) {
|
||||
// ui->fieldTreeWidget->topLevelItem(0)->setSelected(true);
|
||||
// }
|
||||
}
|
||||
|
||||
DisplayFilterExpressionDialog::~DisplayFilterExpressionDialog()
|
||||
|
@ -195,8 +196,8 @@ void DisplayFilterExpressionDialog::updateWidgets()
|
|||
|
||||
QPushButton *ok_bt = ui->buttonBox->button(QDialogButtonBox::Ok);
|
||||
if (ok_bt) {
|
||||
bool ok_enable = !ui->displayFilterLineEdit->text().isEmpty()
|
||||
&& (ui->displayFilterLineEdit->syntaxState() != SyntaxLineEdit::Invalid);
|
||||
bool ok_enable = !(ui->displayFilterLineEdit->text().isEmpty()
|
||||
|| (ui->displayFilterLineEdit->syntaxState() == SyntaxLineEdit::Invalid));
|
||||
ok_bt->setEnabled(ok_enable);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue