]> sigrok.org Git - pulseview.git/commitdiff
decoder_selector: Expand "All Decoders" if the user filtered
authorUwe Hermann <redacted>
Sat, 29 Jun 2019 20:58:13 +0000 (22:58 +0200)
committerUwe Hermann <redacted>
Sat, 29 Jun 2019 20:59:30 +0000 (22:59 +0200)
pv/subwindows/decoder_selector/subwindow.cpp

index fb354ffd966e191c361d9307f031e13c8a9649ed..5665a3227c806373f5c31a58eca2519e974d86fe 100644 (file)
@@ -304,6 +304,9 @@ void SubWindow::on_item_activated(const QModelIndex& index)
 void SubWindow::on_filter_changed(const QString& text)
 {
        sort_filter_model_->setFilterFixedString(text);
+
+       // Expand the "All Decoders" category/tag if the user filtered
+       tree_view_->setExpanded(tree_view_->model()->index(0, 0), !text.isEmpty());
 }
 
 } // namespace decoder_selector