Skip to content

Commit

Permalink
Fix invalid sort key preventing load
Browse files Browse the repository at this point in the history
  • Loading branch information
CoreyD97 committed Apr 27, 2020
1 parent 27ddf2d commit 555db6a
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -68,7 +68,11 @@ public class LogTable extends JTable
Integer sortColumn = this.preferences.getSetting(Globals.PREF_SORT_COLUMN);
SortOrder sortOrder = this.preferences.getSetting(Globals.PREF_SORT_ORDER);
if(sortColumn >= 0 && sortOrder != SortOrder.UNSORTED){
this.sorter.setSortKeys(Collections.singletonList(new RowSorter.SortKey(sortColumn, sortOrder)));
try {
this.sorter.setSortKeys(Collections.singletonList(new RowSorter.SortKey(sortColumn, sortOrder)));
}catch (IllegalArgumentException exception){
//If we can't set the sort key because its invalid, just ignore it.
}
}

this.getSelectionModel().addListSelectionListener(e -> {
Expand Down

0 comments on commit 555db6a

Please sign in to comment.