mirror of
https://github.com/elisspace/autopsy.git
synced 2026-10-02 07:19:53 +00:00
5367 undo autoformat coment, fix max page number calc
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user