mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 10:17:41 +00:00
Added logic to remove existing dashboard instance.
This commit is contained in:
parent
7ae70957be
commit
42e264ea68
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Autopsy Forensic Browser
|
||||
*
|
||||
* Copyright 2011-2017 Basis Technology Corp.
|
||||
* Copyright 2011-2018 Basis Technology Corp.
|
||||
* Contact: carrier <at> sleuthkit <dot> 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
|
||||
|
||||
try {
|
||||
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;
|
||||
try {
|
||||
dashboard = AutoIngestDashboard.createDashboard();
|
||||
AutoIngestDashboard dashboard = AutoIngestDashboard.createDashboard();
|
||||
tc.add(dashboard);
|
||||
dashboard.setSize(dashboard.getPreferredSize());
|
||||
if (tc.isOpened() == false) {
|
||||
|
||||
tc.open();
|
||||
}
|
||||
tc.toFront();
|
||||
|
Loading…
x
Reference in New Issue
Block a user