mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 10:17:41 +00:00
Fixed mistake made when changing constructor of Known File Filter Node.
This commit is contained in:
parent
4940e06e0e
commit
2256b6a095
@ -95,8 +95,8 @@ public class KnownFileFilterNode extends FilterNode {
|
||||
* @param arg
|
||||
* @param context
|
||||
*/
|
||||
public KnownFileFilterNode(Node arg) {
|
||||
super(arg, new KnownFileFilterChildren(arg, getSelectionContext(arg)));
|
||||
public KnownFileFilterNode(Node arg, SelectionContext context) {
|
||||
super(arg, new KnownFileFilterChildren(arg, context));
|
||||
|
||||
if (addListener) {
|
||||
addPreferenceListener();
|
||||
@ -114,7 +114,7 @@ public class KnownFileFilterNode extends FilterNode {
|
||||
* @param n
|
||||
* @return
|
||||
*/
|
||||
private static SelectionContext getSelectionContext(Node n) {
|
||||
public static SelectionContext getSelectionContext(Node n) {
|
||||
if (n == null || n.getParentNode() == null) {
|
||||
// Parent of root node or root node. Occurs during case open / close.
|
||||
return SelectionContext.OTHER;
|
||||
@ -198,7 +198,7 @@ public class KnownFileFilterNode extends FilterNode {
|
||||
if (filter) {
|
||||
// Filter out child nodes that represent known files
|
||||
AbstractFile file = arg.getLookup().lookup(AbstractFile.class);
|
||||
if (file!= null && file.getKnown() == TskData.FileKnown.KNOWN) {
|
||||
if (file != null && (file.getKnown() == TskData.FileKnown.KNOWN)) {
|
||||
return new Node[]{};
|
||||
}
|
||||
}
|
||||
|
@ -635,7 +635,7 @@ public final class DirectoryTreeTopComponent extends TopComponent implements Dat
|
||||
|
||||
//set node, wrap in filter node first to filter out children
|
||||
Node drfn = new DataResultFilterNode(originNode, DirectoryTreeTopComponent.this.em);
|
||||
Node kffn = new KnownFileFilterNode(drfn);
|
||||
Node kffn = new KnownFileFilterNode(drfn, KnownFileFilterNode.getSelectionContext(originNode));
|
||||
dataResult.setNode(new TableFilterNode(kffn, true));
|
||||
|
||||
String displayName = "";
|
||||
|
Loading…
x
Reference in New Issue
Block a user