mirror of
https://github.com/elisspace/autopsy.git
synced 2026-09-06 02:24:30 +00:00
Don't refresh directory tree when a module data event is called for the general info artifact.
This commit is contained in:
@@ -588,6 +588,9 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat
|
||||
respondSelection((Node[]) oldValue, (Node[]) newValue);
|
||||
} else if (changed.equals(IngestModuleEvent.DATA.toString())) {
|
||||
final ModuleDataEvent event = (ModuleDataEvent) oldValue;
|
||||
if (event.getArtifactType() == BlackboardArtifact.ARTIFACT_TYPE.TSK_GEN_INFO) {
|
||||
return;
|
||||
}
|
||||
SwingUtilities.invokeLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@@ -808,14 +811,6 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat
|
||||
* be called in the gui thread
|
||||
*/
|
||||
public void refreshTree(final BlackboardArtifact.ARTIFACT_TYPE... types) {
|
||||
ArrayList<BlackboardArtifact.ARTIFACT_TYPE> typeList = new ArrayList<>(Arrays.asList((BlackboardArtifact.ARTIFACT_TYPE[])types));
|
||||
while (typeList.contains(BlackboardArtifact.ARTIFACT_TYPE.TSK_GEN_INFO)) {
|
||||
typeList.remove(BlackboardArtifact.ARTIFACT_TYPE.TSK_GEN_INFO);
|
||||
}
|
||||
if (typeList.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
//save current selection
|
||||
Node selectedNode = getSelectedNode();
|
||||
final String[] selectedPath = NodeOp.createPath(selectedNode, em.getRootContext());
|
||||
@@ -834,7 +829,7 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat
|
||||
OriginalNode original = results.getLookup().lookup(OriginalNode.class);
|
||||
ResultsNode resultsNode = (ResultsNode) original.getNode();
|
||||
RootContentChildren resultsNodeChilds = (RootContentChildren) resultsNode.getChildren();
|
||||
resultsNodeChilds.refreshKeys(typeList.toArray(new BlackboardArtifact.ARTIFACT_TYPE[typeList.size()]));
|
||||
resultsNodeChilds.refreshKeys(types);
|
||||
|
||||
final TreeView tree = getTree();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user