mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-11 23:46:15 +00:00
workaround in keyword search panel for node being set twice sometimes
This commit is contained in:
parent
a4a34d3f3c
commit
e7b67e5eb8
@ -51,7 +51,7 @@ public class ExtractedContentViewer implements DataContentViewer {
|
||||
|
||||
private static final Logger logger = Logger.getLogger(ExtractedContentViewer.class.getName());
|
||||
private ExtractedContentPanel panel;
|
||||
private Node currentNode = null;
|
||||
private volatile Node currentNode = null;
|
||||
private MarkupSource currentSource = null;
|
||||
private final IsDirVisitor isDirVisitor = new IsDirVisitor();
|
||||
//keep last content cached
|
||||
@ -65,8 +65,6 @@ public class ExtractedContentViewer implements DataContentViewer {
|
||||
|
||||
@Override
|
||||
public void setNode(final Node selectedNode) {
|
||||
//TODO why setNode() is called twice for the same node each time
|
||||
|
||||
// to clear the viewer
|
||||
if (selectedNode == null) {
|
||||
currentNode = null;
|
||||
@ -74,7 +72,14 @@ public class ExtractedContentViewer implements DataContentViewer {
|
||||
return;
|
||||
}
|
||||
|
||||
this.currentNode = selectedNode;
|
||||
//TODO why setNode() is called twice for the same node sometimes (when selected in dir tree first)
|
||||
//for now, do not update second time
|
||||
if (selectedNode == currentNode) {
|
||||
return;
|
||||
}
|
||||
else {
|
||||
currentNode = selectedNode;
|
||||
}
|
||||
|
||||
// sources are custom markup from the node (if available) and default
|
||||
// markup is fetched from solr
|
||||
|
Loading…
x
Reference in New Issue
Block a user