diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java b/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java index 6841574fd062e7ef20d1282db60b44321dc5edb8..631cc98672d1051173663d5a4c6d67f87e24023a 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/DataResultViewerTable.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2012-2019 Basis Technology Corp. + * Copyright 2012-2021 Basis Technology Corp. * Contact: carrier <at> sleuthkit <dot> org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -442,8 +442,6 @@ private void setupTable() { ((DefaultOutlineModel) outline.getOutlineModel()).setNodesColumnLabel(firstProp.getDisplayName()); } - setColumnWidths(); - /* * Load column sorting information from preferences file and apply it to * columns. @@ -465,6 +463,19 @@ private void setupTable() { */ loadColumnVisibility(); + /* + * Set the column widths. + * + * IMPORTANT: This needs to come after the preceding calls to determine + * the columns that will be displayed and their layout, which includes a + * call to ResultViewerPersistence.getAllChildProperties(). That method + * calls Children.getNodes(true) on the root node to ensure ALL of the + * nodes have been created in the NetBeans asynch child creation thread, + * and then uses the first one hundred nodes to determine which columns + * to display, including their header text. + */ + setColumnWidths(); + /* * If one of the child nodes of the root node is to be selected, select * it. diff --git a/Core/src/org/sleuthkit/autopsy/corecomponents/ResultViewerPersistence.java b/Core/src/org/sleuthkit/autopsy/corecomponents/ResultViewerPersistence.java index 7d03ec65eb311a219bf17dea32107245711438aa..a981b04112497235f61cfc424090165765653811 100644 --- a/Core/src/org/sleuthkit/autopsy/corecomponents/ResultViewerPersistence.java +++ b/Core/src/org/sleuthkit/autopsy/corecomponents/ResultViewerPersistence.java @@ -1,7 +1,7 @@ /* * Autopsy Forensic Browser * - * Copyright 2011-17 Basis Technology Corp. + * Copyright 2017-2021 Basis Technology Corp. * Contact: carrier <at> sleuthkit <dot> org * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -126,7 +126,7 @@ static List<Node.Property<?>> getAllChildProperties(Node node, int maxRows) { static private void getAllChildPropertiesHelper(Node node, int maxRows, Set<Node.Property<?>> propertiesAcc) { Children children = node.getChildren(); int childCount = 0; - for (Node child : children.getNodes()) { + for (Node child : children.getNodes(true)) { childCount++; if (childCount > maxRows) { return;