mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 18:17:43 +00:00
Make sure property change handlers dispatch to EDT
This commit is contained in:
parent
e590490b79
commit
a29db0a501
@ -544,12 +544,20 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat
|
|||||||
// data model objects when a case is closed.
|
// data model objects when a case is closed.
|
||||||
if (oldValue != null && newValue == null) {
|
if (oldValue != null && newValue == null) {
|
||||||
// The current case has been closed. Reset the ExplorerManager.
|
// The current case has been closed. Reset the ExplorerManager.
|
||||||
|
SwingUtilities.invokeLater(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
Node emptyNode = new AbstractNode(Children.LEAF);
|
Node emptyNode = new AbstractNode(Children.LEAF);
|
||||||
em.setRootContext(emptyNode);
|
em.setRootContext(emptyNode);
|
||||||
|
}
|
||||||
|
});
|
||||||
} else if (newValue != null) {
|
} else if (newValue != null) {
|
||||||
// A new case has been opened. Reset the ExplorerManager.
|
// A new case has been opened. Reset the ExplorerManager.
|
||||||
Case newCase = (Case) newValue;
|
Case newCase = (Case) newValue;
|
||||||
String newCaseName = newCase.getName();
|
final String newCaseName = newCase.getName();
|
||||||
|
SwingUtilities.invokeLater(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
em.getRootContext().setName(newCaseName);
|
em.getRootContext().setName(newCaseName);
|
||||||
em.getRootContext().setDisplayName(newCaseName);
|
em.getRootContext().setDisplayName(newCaseName);
|
||||||
|
|
||||||
@ -561,12 +569,24 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat
|
|||||||
// reconsideration.
|
// reconsideration.
|
||||||
resetHistory();
|
resetHistory();
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
} // if the image is added to the case
|
} // if the image is added to the case
|
||||||
else if (changed.equals(Case.Events.DATA_SOURCE_ADDED.toString())) {
|
else if (changed.equals(Case.Events.DATA_SOURCE_ADDED.toString())) {
|
||||||
|
SwingUtilities.invokeLater(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
componentOpened();
|
componentOpened();
|
||||||
|
}
|
||||||
|
});
|
||||||
} // change in node selection
|
} // change in node selection
|
||||||
else if (changed.equals(ExplorerManager.PROP_SELECTED_NODES)) {
|
else if (changed.equals(ExplorerManager.PROP_SELECTED_NODES)) {
|
||||||
|
SwingUtilities.invokeLater(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
respondSelection((Node[]) oldValue, (Node[]) newValue);
|
respondSelection((Node[]) oldValue, (Node[]) newValue);
|
||||||
|
}
|
||||||
|
});
|
||||||
} else if (changed.equals(IngestManager.IngestModuleEvent.DATA_ADDED.toString())) {
|
} else if (changed.equals(IngestManager.IngestModuleEvent.DATA_ADDED.toString())) {
|
||||||
// nothing to do here.
|
// nothing to do here.
|
||||||
// all nodes should be listening for these events and update accordingly.
|
// all nodes should be listening for these events and update accordingly.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user