From e3d17bbef6fde0302036b30811680ebabd230858 Mon Sep 17 00:00:00 2001
From: hch <305670599@qq.com>
Date: 星期一, 09 十二月 2024 20:43:11 +0800
Subject: [PATCH] 0312 还原主界面打开问题

---
 System/WindowBase/WindowCenter.cs |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/System/WindowBase/WindowCenter.cs b/System/WindowBase/WindowCenter.cs
index 2eef1d2..e126886 100644
--- a/System/WindowBase/WindowCenter.cs
+++ b/System/WindowBase/WindowCenter.cs
@@ -496,8 +496,8 @@
 
         internal void NotifyBeforeOpen<T>(T window) where T : Window
         {
-            if (ConfigInitiator.done && window is not MainInterfaceWin && !WindowJumpMgr.Instance.IsJumpState)
-                CalcMainInterfaceWin();
+            //if (ConfigInitiator.done && window is not MainInterfaceWin && !WindowJumpMgr.Instance.IsJumpState)
+            //    CalcMainInterfaceWin();
 
             if (windowBeforeOpenEvent != null)
             {
@@ -531,8 +531,8 @@
 
         internal void JumpNotifyAfterClose<T>(T window) where T : Window
         {
-            if (ConfigInitiator.done && window is not MainInterfaceWin && !WindowJumpMgr.Instance.IsJumpState)
-                CalcMainInterfaceWin();
+            //if (ConfigInitiator.done && window is not MainInterfaceWin && !WindowJumpMgr.Instance.IsJumpState)
+            //    CalcMainInterfaceWin();
             if (jumpWindowCloseEvent != null)
             {
                 jumpWindowCloseEvent(window);
@@ -584,6 +584,8 @@
         float checkTimer = 0f;
         private void LateUpdate()
         {
+            var checkMainWinImmedidately = closeCommands.Count + openCommands.Count > 0;
+
             while (closeCommands.Count > 0)
             {
                 var command = closeCommands[0];
@@ -625,6 +627,13 @@
                 }
 
             }
+
+            checkTimer += checkMainWinImmedidately ? 1f : Time.deltaTime;
+            if (checkTimer > 0.25f)
+            {
+                checkTimer = 0f;
+                CalcMainInterfaceWin();
+            }
         }
 
         //涓荤晫闈㈢殑寮�鍏抽粯璁ゅ鐞�

--
Gitblit v1.8.0