mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-19 11:07:43 +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 arg
|
||||||
* @param context
|
* @param context
|
||||||
*/
|
*/
|
||||||
public KnownFileFilterNode(Node arg) {
|
public KnownFileFilterNode(Node arg, SelectionContext context) {
|
||||||
super(arg, new KnownFileFilterChildren(arg, getSelectionContext(arg)));
|
super(arg, new KnownFileFilterChildren(arg, context));
|
||||||
|
|
||||||
if (addListener) {
|
if (addListener) {
|
||||||
addPreferenceListener();
|
addPreferenceListener();
|
||||||
@ -114,7 +114,7 @@ public class KnownFileFilterNode extends FilterNode {
|
|||||||
* @param n
|
* @param n
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
private static SelectionContext getSelectionContext(Node n) {
|
public static SelectionContext getSelectionContext(Node n) {
|
||||||
if (n == null || n.getParentNode() == null) {
|
if (n == null || n.getParentNode() == null) {
|
||||||
// Parent of root node or root node. Occurs during case open / close.
|
// Parent of root node or root node. Occurs during case open / close.
|
||||||
return SelectionContext.OTHER;
|
return SelectionContext.OTHER;
|
||||||
@ -198,7 +198,7 @@ public class KnownFileFilterNode extends FilterNode {
|
|||||||
if (filter) {
|
if (filter) {
|
||||||
// Filter out child nodes that represent known files
|
// Filter out child nodes that represent known files
|
||||||
AbstractFile file = arg.getLookup().lookup(AbstractFile.class);
|
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[]{};
|
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
|
//set node, wrap in filter node first to filter out children
|
||||||
Node drfn = new DataResultFilterNode(originNode, DirectoryTreeTopComponent.this.em);
|
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));
|
dataResult.setNode(new TableFilterNode(kffn, true));
|
||||||
|
|
||||||
String displayName = "";
|
String displayName = "";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user