From 3c75b4388219df8e2dc9de809ad587678e901cce Mon Sep 17 00:00:00 2001 From: Kelly Kelly Date: Tue, 20 Apr 2021 12:24:49 -0400 Subject: [PATCH] Fixed cvt thread selection issue --- .../relationships/MessageViewer.java | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/communications/relationships/MessageViewer.java b/Core/src/org/sleuthkit/autopsy/communications/relationships/MessageViewer.java index 005689d8a8..1c4c538ea9 100755 --- a/Core/src/org/sleuthkit/autopsy/communications/relationships/MessageViewer.java +++ b/Core/src/org/sleuthkit/autopsy/communications/relationships/MessageViewer.java @@ -49,6 +49,7 @@ import org.openide.nodes.Children; import org.openide.nodes.Node; import org.openide.nodes.Node.Property; import org.openide.nodes.Node.PropertySet; +import org.openide.util.Exceptions; import org.openide.util.Lookup; import org.openide.util.NbBundle.Messages; import org.sleuthkit.autopsy.communications.ModifiableProxyLookup; @@ -146,14 +147,23 @@ final class MessageViewer extends JPanel implements RelationshipsViewer { @Override public void setSelectionInfo(SelectionInfo info) { - currentSelectionInfo = info; + if(currentSelectionInfo != null && currentSelectionInfo.equals(info)) { + try { + // Clear the currently selected thread so that clicks can + // be registered. + rootTablePane.getExplorerManager().setSelectedNodes(new Node[0]); + } catch (PropertyVetoException ex) { + logger.log(Level.WARNING, "Error clearing the selected node", ex); + } + } else { + currentSelectionInfo = info; + rootMessageFactory.refresh(info); + } currentPanel = rootTablePane; CardLayout layout = (CardLayout) this.getLayout(); - layout.show(this, "threads"); - - rootMessageFactory.refresh(info); + layout.show(this, "threads"); } @Override