summaryrefslogtreecommitdiff
path: root/src/filterlist.cpp
diff options
context:
space:
mode:
authorAL <ga12@hotmail.it>2020-01-09 02:00:50 +0100
committerChris Bessent <lost.dragonist@gmail.com>2020-01-09 18:43:11 -0700
commit340b2e766f5bdef4466398db2617c7077eb9c894 (patch)
treec04f3a877466e6ccd344346b253743d982af4dc4 /src/filterlist.cpp
parentdfa600996c49c1b23dca884c963dc917bd9cfc0a (diff)
List all categories flatly in filters view as nestled ones would otherwise not be accessible.
(cherry picked from commit 734bd0ed20196206364d87c584dce3e1e498f4cd)
Diffstat (limited to 'src/filterlist.cpp')
-rw-r--r--src/filterlist.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/filterlist.cpp b/src/filterlist.cpp
index 69aca4c5..4287869d 100644
--- a/src/filterlist.cpp
+++ b/src/filterlist.cpp
@@ -225,11 +225,9 @@ QTreeWidgetItem* FilterList::addCriteriaItem(
{
auto* item = new CriteriaItem(this, name, type, categoryID);
- if (root != nullptr) {
- root->addChild(item);
- } else {
- ui->filters->addTopLevelItem(item);
- }
+ // For now list all categories flatly without nestling them as there is
+ // no way to espand nodes in the filter view since clicking changes state.
+ ui->filters->addTopLevelItem(item);
item->setTextAlignment(0, Qt::AlignCenter);