From 4cac1b533e133fdc8b3def90a0f998820f51907a Mon Sep 17 00:00:00 2001
From: alielie <alielie@git.com>
Date: 星期三, 26 三月 2025 17:57:59 +0800
Subject: [PATCH] 优化UI,新增日志自动删除;

---
 HMI.UI/Util/MsgBoxHelper.cs |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/HMI.UI/Util/MsgBoxHelper.cs b/HMI.UI/Util/MsgBoxHelper.cs
index 8c01e3f..6d5d49d 100644
--- a/HMI.UI/Util/MsgBoxHelper.cs
+++ b/HMI.UI/Util/MsgBoxHelper.cs
@@ -71,7 +71,7 @@
             MessageBoxResult res = MessageBoxResult.None;
             if (!(owner is Window window))
             {
-                window = Window.GetWindow(owner);
+                window = Window.GetWindow(owner) ?? Application.Current.MainWindow;
             }
             window.Dispatcher.Invoke(() =>
             {

--
Gitblit v1.9.1