fix: buggy game version switching

This commit is contained in:
huanghongxun 2020-03-06 12:35:33 +08:00
parent 7b6a96b4b6
commit 129ce9a545

View File

@ -78,13 +78,12 @@ public class GameList extends ListPageBase<GameListItem> implements DecoratorPag
children.forEach(GameListItem::checkSelection);
profile.selectedVersionProperty().addListener(listenerHolder.weak((a, b, newValue) -> {
Platform.runLater(() -> {
FXUtils.checkFxUserThread();
children.forEach(it -> it.selectedProperty().set(false));
children.stream()
.filter(it -> it.getVersion().equals(newValue))
.findFirst()
.ifPresent(it -> it.selectedProperty().set(true));
});
}));
}
toggleGroup.selectedToggleProperty().addListener((o, a, toggle) -> {