7653 eliminate null check preventing proper reset

This commit is contained in:
William Schaefer 2021-06-09 12:25:47 -04:00
parent c86cdf5591
commit ffce7d10b4
2 changed files with 7 additions and 10 deletions

View File

@ -1,7 +1,7 @@
/*
* Autopsy Forensic Browser
*
* Copyright 2019 Basis Technology Corp.
* Copyright 2019-2021 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> org
*
* Licensed under the Apache License, Version 2.0 (the "License");

View File

@ -37,15 +37,15 @@ public final class RelationshipBrowser extends JPanel implements Lookup.Provider
*/
public RelationshipBrowser() {
initComponents();
MessageViewer messagesViewer = new MessageViewer();
ContactsViewer contactsViewer = new ContactsViewer();
SummaryViewer summaryViewer = new SummaryViewer();
MediaViewer mediaViewer = new MediaViewer();
CallLogViewer callLogViewer = new CallLogViewer();
proxyLookup = new ModifiableProxyLookup(messagesViewer.getLookup());
tabPane.add(summaryViewer.getDisplayName(), summaryViewer);
tabPane.add(messagesViewer.getDisplayName(), messagesViewer);
tabPane.add(callLogViewer.getDisplayName(), callLogViewer);
@ -95,13 +95,10 @@ public final class RelationshipBrowser extends JPanel implements Lookup.Provider
}// </editor-fold>//GEN-END:initComponents
private void tabPaneStateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_tabPaneStateChanged
if(currentSelection != null) {
((RelationshipsViewer) tabPane.getSelectedComponent()).setSelectionInfo(currentSelection);
}
((RelationshipsViewer) tabPane.getSelectedComponent()).setSelectionInfo(currentSelection);
Component selectedComponent = tabPane.getSelectedComponent();
if(selectedComponent instanceof Lookup.Provider) {
Lookup lookup = ((Lookup.Provider)selectedComponent).getLookup();
if (selectedComponent instanceof Lookup.Provider) {
Lookup lookup = ((Lookup.Provider) selectedComponent).getLookup();
proxyLookup.setNewLookups(lookup);
}
}//GEN-LAST:event_tabPaneStateChanged