aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2018-01-04 16:57:01 -0500
committerMichael Mann <mmann78@netscape.net>2018-01-04 23:50:38 +0000
commitdce8682e10622aa24ee1d7bbe499d8107e429011 (patch)
treee45c34f8de6625741e93a87e1194a1c8c7eda142
parent0b997f3a3aa63224f4a4578c34cee4f074d66876 (diff)
Qt: Reexpand dissector table and enabled protocol trees when dialog is searched.
If search text ends up with no results, the tree is cleared. When the search text is removed, it results in all but main leaf being collapsed. Restore the search tree to its default state after any search text has been entered. Change-Id: Id7d1a4fcb4355c6e2551cf3dfd300e26bf683ca3 Reviewed-on: https://code.wireshark.org/review/25148 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
-rw-r--r--ui/qt/dissector_tables_dialog.cpp3
-rw-r--r--ui/qt/enabled_protocols_dialog.cpp3
2 files changed, 6 insertions, 0 deletions
diff --git a/ui/qt/dissector_tables_dialog.cpp b/ui/qt/dissector_tables_dialog.cpp
index 2260f65fdb..91d55dc8a6 100644
--- a/ui/qt/dissector_tables_dialog.cpp
+++ b/ui/qt/dissector_tables_dialog.cpp
@@ -46,6 +46,9 @@ DissectorTablesDialog::~DissectorTablesDialog()
void DissectorTablesDialog::on_txtSearchLine_textChanged(const QString &search_re)
{
proxyModel_->setFilter(search_re);
+ /* If items are filtered out, then filtered back in, the tree remains collapsed
+ Force an expansion */
+ ui->tableTree->expandToDepth(0);
}
/*
diff --git a/ui/qt/enabled_protocols_dialog.cpp b/ui/qt/enabled_protocols_dialog.cpp
index 98f56b4b8f..1761b52c12 100644
--- a/ui/qt/enabled_protocols_dialog.cpp
+++ b/ui/qt/enabled_protocols_dialog.cpp
@@ -87,6 +87,9 @@ void EnabledProtocolsDialog::on_disable_all_button__clicked()
void EnabledProtocolsDialog::on_search_line_edit__textChanged(const QString &search_re)
{
proxyModel_->setFilter(search_re);
+ /* If items are filtered out, then filtered back in, the tree remains collapsed
+ Force an expansion */
+ ui->protocol_tree_->expandAll();
}
void EnabledProtocolsDialog::on_buttonBox_accepted()