From 575d908dbaebb29e7987ac0d504878675d74b8ba Mon Sep 17 00:00:00 2001 From: Glavo Date: Wed, 4 Feb 2026 22:24:03 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20#5338:=20=E4=BF=AE=E5=A4=8D=E9=83=A8?= =?UTF-8?q?=E5=88=86=E7=8E=AF=E5=A2=83=E4=B8=AD=E8=BF=9B=E5=85=A5=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E9=A1=B5=E9=9D=A2=E6=97=B6=E5=90=AF=E5=8A=A8=E5=99=A8?= =?UTF-8?q?=E5=B4=A9=E6=BA=83=E7=9A=84=E9=97=AE=E9=A2=98=20(#5433)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/jackhuang/hmcl/ui/versions/DownloadListPage.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadListPage.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadListPage.java index 676998138..bf0bee3d9 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadListPage.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/DownloadListPage.java @@ -48,6 +48,7 @@ import org.jackhuang.hmcl.task.Task; import org.jackhuang.hmcl.ui.Controllers; import org.jackhuang.hmcl.ui.FXUtils; import org.jackhuang.hmcl.ui.WeakListenerHolder; +import org.jackhuang.hmcl.ui.construct.NoneMultipleSelectionModel; import org.jackhuang.hmcl.ui.construct.RipplerContainer; import org.jackhuang.hmcl.ui.construct.SpinnerPane; import org.jackhuang.hmcl.ui.construct.TwoLineListItem; @@ -521,7 +522,7 @@ public class DownloadListPage extends Control implements DecoratorPage, VersionP spinnerPane.setContent(listView); Bindings.bindContent(listView.getItems(), getSkinnable().items); - listView.setSelectionModel(null); + listView.setSelectionModel(new NoneMultipleSelectionModel<>()); // ListViewBehavior would consume ESC pressed event, preventing us from handling it, so we ignore it here ignoreEvent(listView, KeyEvent.KEY_PRESSED, e -> e.getCode() == KeyCode.ESCAPE);