mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-16 17:57:43 +00:00
6639 fix appearance of past occrrurences filter
This commit is contained in:
parent
e2a7b72525
commit
d0be74fc65
@ -39,12 +39,11 @@ public class DomainFilterPanel extends AbstractFiltersPanel {
|
||||
addFilter(new ArtifactTypeFilterPanel(), false, null, 1);
|
||||
addFilter(new DateFilterPanel(), false, null, 1);
|
||||
int[] pastOccurrencesIndices;
|
||||
if (!CentralRepository.isEnabled()) {
|
||||
pastOccurrencesIndices = new int[]{0};
|
||||
} else {
|
||||
if (CentralRepository.isEnabled()) {
|
||||
pastOccurrencesIndices = new int[]{2, 3, 4};
|
||||
addFilter(new PastOccurrencesFilterPanel(), true, pastOccurrencesIndices, 0);
|
||||
}
|
||||
addFilter(new PastOccurrencesFilterPanel(), true, pastOccurrencesIndices, 0);
|
||||
|
||||
addPanelsToScrollPane(domainFiltersSplitPane);
|
||||
}
|
||||
|
||||
|
@ -38,15 +38,9 @@ final class PastOccurrencesFilterPanel extends AbstractDiscoveryFilterPanel {
|
||||
*/
|
||||
PastOccurrencesFilterPanel() {
|
||||
initComponents();
|
||||
setUpFrequencyFilter(ResultType.FILE);
|
||||
}
|
||||
/**
|
||||
* Creates new form PastOccurrencesFilterPanel.
|
||||
*/
|
||||
PastOccurrencesFilterPanel(ResultType type) {
|
||||
initComponents();
|
||||
setUpFrequencyFilter(type);
|
||||
setUpFrequencyFilter();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called from within the constructor to initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is always
|
||||
@ -101,11 +95,11 @@ final class PastOccurrencesFilterPanel extends AbstractDiscoveryFilterPanel {
|
||||
/**
|
||||
* Initialize the frequency filter.
|
||||
*/
|
||||
private void setUpFrequencyFilter(ResultType type) {
|
||||
private void setUpFrequencyFilter() {
|
||||
int count = 0;
|
||||
DefaultListModel<FileSearchData.Frequency> frequencyListModel = (DefaultListModel<FileSearchData.Frequency>) crFrequencyList.getModel();
|
||||
frequencyListModel.removeAllElements();
|
||||
if (!CentralRepository.isEnabled() && type != ResultType.ATTRIBUTE) {
|
||||
if (!CentralRepository.isEnabled()) {
|
||||
for (FileSearchData.Frequency freq : FileSearchData.Frequency.getOptionsForFilteringWithoutCr()) {
|
||||
frequencyListModel.add(count, freq);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user