From d0be74fc65d95e7dbf1a5b82652e39b9be25452c Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Mon, 17 Aug 2020 10:06:59 -0400 Subject: [PATCH] 6639 fix appearance of past occrrurences filter --- .../autopsy/discovery/DomainFilterPanel.java | 7 +++---- .../discovery/PastOccurrencesFilterPanel.java | 14 ++++---------- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/discovery/DomainFilterPanel.java b/Core/src/org/sleuthkit/autopsy/discovery/DomainFilterPanel.java index 175c64d3a9..9091d0f3c9 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/DomainFilterPanel.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/DomainFilterPanel.java @@ -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); } diff --git a/Core/src/org/sleuthkit/autopsy/discovery/PastOccurrencesFilterPanel.java b/Core/src/org/sleuthkit/autopsy/discovery/PastOccurrencesFilterPanel.java index 0766443629..cd20850a55 100644 --- a/Core/src/org/sleuthkit/autopsy/discovery/PastOccurrencesFilterPanel.java +++ b/Core/src/org/sleuthkit/autopsy/discovery/PastOccurrencesFilterPanel.java @@ -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 frequencyListModel = (DefaultListModel) crFrequencyList.getModel(); frequencyListModel.removeAllElements(); - if (!CentralRepository.isEnabled() && type != ResultType.ATTRIBUTE) { + if (!CentralRepository.isEnabled()) { for (FileSearchData.Frequency freq : FileSearchData.Frequency.getOptionsForFilteringWithoutCr()) { frequencyListModel.add(count, freq); }