From 7a67faaa04d6521dbff1bd1869929bdfa34da317 Mon Sep 17 00:00:00 2001 From: Kelly Kelly Date: Thu, 5 Dec 2019 14:50:58 -0500 Subject: [PATCH] Moved the call to generate the report to a thread --- .../autopsy/geolocation/GeolocationTopComponent.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/geolocation/GeolocationTopComponent.java b/Core/src/org/sleuthkit/autopsy/geolocation/GeolocationTopComponent.java index e66aaf68aa..063d054b7f 100755 --- a/Core/src/org/sleuthkit/autopsy/geolocation/GeolocationTopComponent.java +++ b/Core/src/org/sleuthkit/autopsy/geolocation/GeolocationTopComponent.java @@ -37,6 +37,7 @@ import java.util.TimeZone; import java.util.logging.Level; import javax.swing.JOptionPane; import javax.swing.SwingUtilities; +import javax.swing.SwingWorker; import org.openide.filesystems.FileUtil; import org.openide.util.NbBundle.Messages; import org.openide.windows.RetainLocation; @@ -370,8 +371,15 @@ public final class GeolocationTopComponent extends TopComponent { String reportBaseDir = createReportDirectory(); progressPanel.setLabels(REPORT_KML, reportBaseDir); - - KMLReport.getDefault().generateReport(reportBaseDir, progressPanel, MapWaypoint.getDataModelWaypoints(visiblePoints)); + + SwingWorker worker = new SwingWorker() { + @Override + protected Void doInBackground() throws Exception { + KMLReport.getDefault().generateReport(reportBaseDir, progressPanel, MapWaypoint.getDataModelWaypoints(visiblePoints)); + return null; + } + }; + worker.execute(); JOptionPane.showConfirmDialog(this, progressPanel, Bundle.GeolocationTC_report_progress_title(), JOptionPane.CLOSED_OPTION, JOptionPane.PLAIN_MESSAGE); } catch (IOException ex) { logger.log(Level.WARNING, "Unable to create KML report", ex);