mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-13 08:26:15 +00:00
Merge pull request #6562 from APriestman/7135_ingestJobUpdate
7135 Handle case close events correctly
This commit is contained in:
commit
eb2b9a8e4e
@ -89,8 +89,15 @@ public final class IngestJobInfoPanel extends javax.swing.JPanel {
|
||||
return;
|
||||
}
|
||||
|
||||
if (CURRENT_CASE == Case.Events.valueOf(evt.getPropertyName())) {
|
||||
refresh();
|
||||
// Check whether we have a case open or case close event.
|
||||
if ((CURRENT_CASE == Case.Events.valueOf(evt.getPropertyName()))) {
|
||||
if (evt.getNewValue() != null) {
|
||||
// Case open
|
||||
refresh();
|
||||
} else {
|
||||
// Case close
|
||||
reset();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -124,7 +131,7 @@ public final class IngestJobInfoPanel extends javax.swing.JPanel {
|
||||
*/
|
||||
private void refresh() {
|
||||
try {
|
||||
if (Case.isCaseOpen()) {
|
||||
if (Case.isCaseOpen()) { // Note - this will generally return true when handling a case close event
|
||||
SleuthkitCase skCase = Case.getCurrentCaseThrows().getSleuthkitCase();
|
||||
this.ingestJobs = skCase.getIngestJobs();
|
||||
setDataSource(selectedDataSource);
|
||||
@ -138,6 +145,14 @@ public final class IngestJobInfoPanel extends javax.swing.JPanel {
|
||||
JOptionPane.showMessageDialog(this, Bundle.IngestJobInfoPanel_loadIngestJob_error_text(), Bundle.IngestJobInfoPanel_loadIngestJob_error_title(), JOptionPane.ERROR_MESSAGE);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset the panel.
|
||||
*/
|
||||
private void reset() {
|
||||
this.ingestJobs = new ArrayList<>();
|
||||
setDataSource(null);
|
||||
}
|
||||
|
||||
@Messages({"IngestJobInfoPanel.IngestJobTableModel.StartTime.header=Start Time",
|
||||
"IngestJobInfoPanel.IngestJobTableModel.EndTime.header=End Time",
|
||||
|
Loading…
x
Reference in New Issue
Block a user