mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-16 17:57:43 +00:00
Merge pull request #994 from rcordovano/case_on_edt
Remove EDT queueing of operations within Case class
This commit is contained in:
commit
1ca90b5131
@ -18,7 +18,6 @@
|
||||
*/
|
||||
package org.sleuthkit.autopsy.casemodule;
|
||||
|
||||
import java.awt.EventQueue;
|
||||
import java.awt.Frame;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.beans.PropertyChangeSupport;
|
||||
@ -1078,7 +1077,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
|
||||
}
|
||||
|
||||
//case change helper
|
||||
private static void doCaseChange(final Case toChangeTo) {
|
||||
private static void doCaseChange(Case toChangeTo) {
|
||||
logger.log(Level.INFO, "Changing Case to: " + toChangeTo); //NON-NLS
|
||||
if (toChangeTo != null) { // new case is open
|
||||
|
||||
@ -1086,9 +1085,6 @@ public class Case implements SleuthkitCase.ErrorObserver {
|
||||
Case.clearTempFolder();
|
||||
checkSubFolders(toChangeTo);
|
||||
|
||||
EventQueue.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
// enable these menus
|
||||
CallableSystemAction.get(AddImageAction.class).setEnabled(true);
|
||||
CallableSystemAction.get(CaseCloseAction.class).setEnabled(true);
|
||||
@ -1102,13 +1098,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
|
||||
// close all top components
|
||||
CoreComponentControl.closeCoreWindows();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
} else { // case is closed
|
||||
EventQueue.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
// close all top components first
|
||||
CoreComponentControl.closeCoreWindows();
|
||||
|
||||
@ -1121,6 +1111,7 @@ public class Case implements SleuthkitCase.ErrorObserver {
|
||||
//clear pending notifications
|
||||
MessageNotifyUtil.Notify.clear();
|
||||
|
||||
|
||||
Frame f = WindowManager.getDefault().getMainWindow();
|
||||
f.setTitle(Case.getAppName()); // set the window name to just application name
|
||||
|
||||
@ -1128,8 +1119,6 @@ public class Case implements SleuthkitCase.ErrorObserver {
|
||||
System.gc();
|
||||
System.gc();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
//log memory usage after case changed
|
||||
logger.log(Level.INFO, PlatformUtil.getAllMemUsageInfo());
|
||||
@ -1141,14 +1130,9 @@ public class Case implements SleuthkitCase.ErrorObserver {
|
||||
private static void doCaseNameChange(String newCaseName) {
|
||||
// update case name
|
||||
if (!newCaseName.equals("")) {
|
||||
EventQueue.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
Frame f = WindowManager.getDefault().getMainWindow();
|
||||
f.setTitle(newCaseName + " - " + Case.getAppName()); // set the window name to the new value
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//delete image helper
|
||||
|
Loading…
x
Reference in New Issue
Block a user