From 1e4f8fc2ac9c1232563875bf83493915bfaaaa48 Mon Sep 17 00:00:00 2001 From: Crystalwarrior Date: Tue, 24 Sep 2019 00:59:12 +0300 Subject: [PATCH] Fix a bug with music search that didn't show the item's parent when it's being searched for --- src/courtroom.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/courtroom.cpp b/src/courtroom.cpp index 8896335..bdd1f77 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -1211,7 +1211,9 @@ void Courtroom::list_music() QList clist = ui_music_list->findItems(ui_music_search->text(), Qt::MatchContains|Qt::MatchRecursive, 0); foreach(QTreeWidgetItem* item, clist) { - item->setHidden(false); + if (item->parent() != nullptr) //So the category shows up too + item->parent()->setHidden(false); + item->setHidden(false); } ui_music_list->expandAll(); }