forked from j62/ctbrec
Fix ClassCastException
This commit is contained in:
parent
dd6f41a574
commit
719ac7d0b3
|
@ -827,10 +827,13 @@ public class ThumbOverviewTab extends Tab implements TabSelectionListener {
|
||||||
List<ThumbCell> thumbsToMove = new ArrayList<>();
|
List<ThumbCell> thumbsToMove = new ArrayList<>();
|
||||||
ObservableList<Node> thumbs = grid.getChildren();
|
ObservableList<Node> thumbs = grid.getChildren();
|
||||||
for (int i = thumbs.size()-1; i >= 0; i--) {
|
for (int i = thumbs.size()-1; i >= 0; i--) {
|
||||||
ThumbCell thumb = (ThumbCell) thumbs.get(i);
|
Node node = thumbs.get(i);
|
||||||
if(recorder.isTracked(thumb.getModel())) {
|
if(node instanceof ThumbCell) {
|
||||||
thumbs.remove(i);
|
ThumbCell thumb = (ThumbCell) thumbs.get(i);
|
||||||
thumbsToMove.add(0, thumb);
|
if(recorder.isTracked(thumb.getModel())) {
|
||||||
|
thumbs.remove(i);
|
||||||
|
thumbsToMove.add(0, thumb);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
thumbs.addAll(0, thumbsToMove);
|
thumbs.addAll(0, thumbsToMove);
|
||||||
|
|
Loading…
Reference in New Issue