From 5d3af58361478f7f6a76b00a3ddbd855e56af413 Mon Sep 17 00:00:00 2001 From: CJKmkp <2564608840@qq.com> Date: Sun, 24 Aug 2025 18:01:04 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=B5=AE=E5=8A=A8=E6=A0=8F=E5=8A=A8?= =?UTF-8?q?=E7=94=BB=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs b/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs index 04a969da..bc6ce32c 100644 --- a/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs +++ b/Ink Canvas/MainWindow_cs/MW_FloatingBarIcons.cs @@ -13,6 +13,7 @@ using System.Windows.Interop; using System.Windows.Media; using System.Windows.Media.Animation; using System.Windows.Media.Imaging; +using System.Windows.Threading; using Application = System.Windows.Application; using Button = System.Windows.Controls.Button; using HorizontalAlignment = System.Windows.HorizontalAlignment; @@ -1899,9 +1900,10 @@ namespace Ink_Canvas HideSubPanels("pen", true); } } - - // 工具切换完成后,统一刷新快捷键状态 - RefreshHotkeyState(); + + + // 延迟半秒后再刷新快捷键状态 + Task.Delay(500).ContinueWith(_ => Dispatcher.BeginInvoke(DispatcherPriority.Background, new Action(() => RefreshHotkeyState()))); // 修复:从线擦切换到批注时,保持之前的笔类型状态 forceEraser = false;