mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-15 06:45:42 -04:00
fix: buggy game version switching
This commit is contained in:
parent
7b6a96b4b6
commit
129ce9a545
@ -78,13 +78,12 @@ public class GameList extends ListPageBase<GameListItem> implements DecoratorPag
|
|||||||
children.forEach(GameListItem::checkSelection);
|
children.forEach(GameListItem::checkSelection);
|
||||||
|
|
||||||
profile.selectedVersionProperty().addListener(listenerHolder.weak((a, b, newValue) -> {
|
profile.selectedVersionProperty().addListener(listenerHolder.weak((a, b, newValue) -> {
|
||||||
Platform.runLater(() -> {
|
FXUtils.checkFxUserThread();
|
||||||
children.forEach(it -> it.selectedProperty().set(false));
|
children.forEach(it -> it.selectedProperty().set(false));
|
||||||
children.stream()
|
children.stream()
|
||||||
.filter(it -> it.getVersion().equals(newValue))
|
.filter(it -> it.getVersion().equals(newValue))
|
||||||
.findFirst()
|
.findFirst()
|
||||||
.ifPresent(it -> it.selectedProperty().set(true));
|
.ifPresent(it -> it.selectedProperty().set(true));
|
||||||
});
|
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
toggleGroup.selectedToggleProperty().addListener((o, a, toggle) -> {
|
toggleGroup.selectedToggleProperty().addListener((o, a, toggle) -> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user