diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboardTopComponent.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboardTopComponent.java index 19a99031f8..579315d5ff 100644 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboardTopComponent.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestDashboardTopComponent.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-2017 Basis Technology Corp. + * Copyright 2011-2018 Basis Technology Corp. * Contact: carrier sleuthkit org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -55,16 +55,22 @@ public final class AutoIngestDashboardTopComponent extends TopComponent { topComponentInitialized = true; WindowManager.getDefault().isTopComponentFloating(tc); Mode mode = WindowManager.getDefault().findMode("dashboard"); // NON-NLS - if (mode != null) { - mode.dockInto(tc); - } - AutoIngestDashboard dashboard; try { - dashboard = AutoIngestDashboard.createDashboard(); - tc.add(dashboard); - dashboard.setSize(dashboard.getPreferredSize()); if (tc.isOpened() == false) { + if (mode != null) { + mode.dockInto(tc); + } + /* + * Make sure we have a clean-slate before attaching a new + * dashboard instance so we don't accumulate them. + */ + tc.removeAll(); + + AutoIngestDashboard dashboard = AutoIngestDashboard.createDashboard(); + tc.add(dashboard); + dashboard.setSize(dashboard.getPreferredSize()); + tc.open(); } tc.toFront();