forked from j62/ctbrec
1
0
Fork 0

Fix ClassCastException

This commit is contained in:
0xb00bface 2021-03-27 18:13:15 +01:00
parent dd6f41a574
commit 719ac7d0b3
1 changed files with 7 additions and 4 deletions

View File

@ -827,12 +827,15 @@ public class ThumbOverviewTab extends Tab implements TabSelectionListener {
List<ThumbCell> thumbsToMove = new ArrayList<>();
ObservableList<Node> thumbs = grid.getChildren();
for (int i = thumbs.size()-1; i >= 0; i--) {
Node node = thumbs.get(i);
if(node instanceof ThumbCell) {
ThumbCell thumb = (ThumbCell) thumbs.get(i);
if(recorder.isTracked(thumb.getModel())) {
thumbs.remove(i);
thumbsToMove.add(0, thumb);
}
}
}
thumbs.addAll(0, thumbsToMove);
}