通过主页右下角弹出菜单切换版本后隐藏菜单 (#4163)

This commit is contained in:
Glavo 2025-07-31 19:41:43 +08:00 committed by GitHub
parent 401fef5774
commit c84afb3155
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -276,7 +276,10 @@ public final class MainPage extends StackPane implements DecoratorPage {
FXUtils.onClicked(menu, popup::hide);
versionNodes = MappedObservableList.create(versions, version -> {
Node node = PopupMenu.wrapPopupMenuItem(new GameItem(profile, version.getId()));
FXUtils.onClicked(node, () -> profile.setSelectedVersion(version.getId()));
FXUtils.onClicked(node, () -> {
profile.setSelectedVersion(version.getId());
popup.hide();
});
return node;
});
Bindings.bindContent(menu.getContent(), versionNodes);