mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-17 10:17:41 +00:00
DataResult viewer now changes to active tab when new node is passed in and current tab is not active.
This commit is contained in:
parent
b8c4597c55
commit
205b3b27c7
@ -290,9 +290,8 @@ public class DataResultPanel extends javax.swing.JPanel implements DataResult, C
|
|||||||
int childrenCount = selectedNode.getChildren().getNodesCount(true);
|
int childrenCount = selectedNode.getChildren().getNodesCount(true);
|
||||||
this.numberMatchLabel.setText(Integer.toString(childrenCount));
|
this.numberMatchLabel.setText(Integer.toString(childrenCount));
|
||||||
}
|
}
|
||||||
|
|
||||||
this.numberMatchLabel.setVisible(true);
|
|
||||||
this.numberMatchLabel.setVisible(true);
|
this.numberMatchLabel.setVisible(true);
|
||||||
|
|
||||||
|
|
||||||
resetTabs(selectedNode);
|
resetTabs(selectedNode);
|
||||||
|
|
||||||
@ -308,11 +307,26 @@ public class DataResultPanel extends javax.swing.JPanel implements DataResult, C
|
|||||||
++drvC;
|
++drvC;
|
||||||
}
|
}
|
||||||
|
|
||||||
// set the display on the current active tab
|
// if the current tab is no longer enabled, then find one that is
|
||||||
|
boolean hasViewerEnabled = true;
|
||||||
int currentActiveTab = this.dataResultTabbedPanel.getSelectedIndex();
|
int currentActiveTab = this.dataResultTabbedPanel.getSelectedIndex();
|
||||||
if (currentActiveTab != -1) {
|
if ((currentActiveTab == -1) || (dataResultTabbedPanel.isEnabledAt(currentActiveTab) == false)) {
|
||||||
UpdateWrapper drv = viewers.get(currentActiveTab);
|
hasViewerEnabled = false;
|
||||||
drv.setNode(selectedNode);
|
for (int i = 0; i < dataResultTabbedPanel.getTabCount(); i++) {
|
||||||
|
if (dataResultTabbedPanel.isEnabledAt(i)) {
|
||||||
|
currentActiveTab = i;
|
||||||
|
hasViewerEnabled = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (hasViewerEnabled) {
|
||||||
|
dataResultTabbedPanel.setSelectedIndex(currentActiveTab);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (hasViewerEnabled) {
|
||||||
|
viewers.get(currentActiveTab).setNode(selectedNode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user