From efebe5b4ff121c5a9ea335119bb669e6e2f3ad06 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Wed, 14 Aug 2019 11:18:19 -0400 Subject: [PATCH] 5367 undo autoformat coment, fix max page number calc --- Core/src/org/sleuthkit/autopsy/filequery/ResultsPanel.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/filequery/ResultsPanel.java b/Core/src/org/sleuthkit/autopsy/filequery/ResultsPanel.java index 4361a6dae1..58cf0875ab 100644 --- a/Core/src/org/sleuthkit/autopsy/filequery/ResultsPanel.java +++ b/Core/src/org/sleuthkit/autopsy/filequery/ResultsPanel.java @@ -159,7 +159,7 @@ public class ResultsPanel extends javax.swing.JPanel { previousPageSize = (int) pageSizeSpinner.getValue(); int pageSize = (int) pageSizeSpinner.getValue(); //handle edge case where group size is 0 and we want the empty results to be labeled paged 1 of 1 not page 1 of 0 - double maxPageDouble = groupSize == 0 ? 0 : Math.ceil((double) groupSize / pageSize); + double maxPageDouble = groupSize == 0 ? 1 : Math.ceil((double) groupSize / pageSize); currentPageLabel.setText(Bundle.ResultsPanel_currentPage_displayValue(currentPage + 1, maxPageDouble)); previousPageButton.setEnabled(currentPage != 0); nextPageButton.setEnabled(groupSize > ((currentPage + 1) * pageSize));