Better filter for store tree view

This commit is contained in:
crschnick 2023-08-14 17:16:28 +00:00
parent 1f8f078523
commit b16cb3ee59
2 changed files with 13 additions and 1 deletions

View file

@ -40,6 +40,14 @@ public class StoreEntryFlatMiniSectionComp extends SimpleComp {
}
private static void add(int depth, StoreSection section) {
if (!section.getWrapper().getState().getValue().isUsable()) {
return;
}
if (!section.getWrapper().getEntry().getProvider().shouldShowInSelectionTree()) {
return;
}
ALL.add(new StoreEntryFlatMiniSectionComp(depth, section.getWrapper().getEntry()));
for (StoreSection child : section.getChildren()) {
add(depth + 1, child);

View file

@ -26,7 +26,11 @@ public class StoreEntryTree {
}
private static void add(TreeItem<StoreEntryWrapper> parent, StoreSection section) {
if (section.getWrapper().getEntry().getState().isUsable() && !section.getWrapper().getEntry().getProvider().shouldShowInSelectionTree()) {
if (!section.getWrapper().getEntry().getState().isUsable()) {
return;
}
if (!section.getWrapper().getEntry().getProvider().shouldShowInSelectionTree()) {
return;
}