From 1a08a23a9c97afee156180123436203403264bbd Mon Sep 17 00:00:00 2001 From: ww-rm Date: Wed, 26 Mar 2025 20:24:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=B9=E9=87=8F=E6=B7=BB=E5=8A=A0=E5=AE=8C?= =?UTF-8?q?=E6=88=90=E8=87=AA=E5=8A=A8=E9=80=89=E4=B8=AD=E6=9C=80=E5=90=8E?= =?UTF-8?q?=E4=B8=80=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SpineViewer/Controls/SpineListView.cs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/SpineViewer/Controls/SpineListView.cs b/SpineViewer/Controls/SpineListView.cs index 48aa49b..b3b4729 100644 --- a/SpineViewer/Controls/SpineListView.cs +++ b/SpineViewer/Controls/SpineListView.cs @@ -12,7 +12,6 @@ using SpineViewer.Spine; using System.Reflection; using System.Diagnostics; using System.Collections.Specialized; - namespace SpineViewer.Controls { public partial class SpineListView : UserControl @@ -166,14 +165,20 @@ namespace SpineViewer.Controls worker.ReportProgress((int)((i + 1) * 100.0) / totalCount, $"已处理 {i + 1}/{totalCount}"); } + // 选中最后一项 + listView.Invoke(() => + { + if (listView.Items.Count > 0) + { + listView.SelectedIndices.Clear(); + listView.SelectedIndices.Add(listView.Items.Count - 1); + } + }); + if (error > 0) - { Program.Logger.Warn("Batch load {} successfully, {} failed", success, error); - } else - { Program.Logger.Info("{} skel loaded successfully", success); - } Program.LogCurrentMemoryUsage(); }