mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 16:06:15 +00:00
set initial disabled state of sub filters based on active state of compound filter
This commit is contained in:
parent
ff3810df09
commit
ddcf547f22
@ -79,8 +79,20 @@ final public class FilterTreeItem extends TreeItem<Filter> {
|
||||
* disable the subfilters if the compound filter is not active.
|
||||
*/
|
||||
compoundFilter.activeProperty().addListener(activeProperty -> {
|
||||
compoundFilter.getSubFilters().forEach(subFilter -> subFilter.setDisabled(compoundFilter.isActive() == false));
|
||||
disableSubFiltersIfNotActive(compoundFilter);
|
||||
});
|
||||
|
||||
disableSubFiltersIfNotActive(compoundFilter);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* disable the sub-filters of the given compound filter if it is not active
|
||||
*
|
||||
* @param compoundFilter the compound filter
|
||||
*/
|
||||
static private void disableSubFiltersIfNotActive(CompoundFilter<?> compoundFilter) {
|
||||
boolean inactive = compoundFilter.isActive() == false;
|
||||
compoundFilter.getSubFilters().forEach(subFilter -> subFilter.setDisabled(inactive));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user