From fc19ffcf4d130b2ef7788475f4b7d7846f56eecd Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期五, 10 一月 2025 09:58:41 +0800
Subject: [PATCH] 1.Servo菜单项;

---
 SourceCode/Bond/BoounionPLC/BoounionPLCDlg.cpp |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/SourceCode/Bond/BoounionPLC/BoounionPLCDlg.cpp b/SourceCode/Bond/BoounionPLC/BoounionPLCDlg.cpp
index d8fc12f..d31d1c0 100644
--- a/SourceCode/Bond/BoounionPLC/BoounionPLCDlg.cpp
+++ b/SourceCode/Bond/BoounionPLC/BoounionPLCDlg.cpp
@@ -358,6 +358,12 @@
 		m_pPagePlcList = nullptr;
 	}
 	
+	if (m_pPageLogcat != nullptr) {
+		m_pPageLogcat->DestroyWindow();
+		delete m_pPageLogcat;
+		m_pPageLogcat = nullptr;
+	}
+
 	if (m_pMainContainer != nullptr) {
 		m_pMainContainer->DestroyWindow();
 		delete m_pMainContainer;
@@ -447,14 +453,12 @@
 	m_bShowLogWnd = !m_bShowLogWnd;
 
 	if (m_bShowLogWnd) {
-		LOGD("显示日志窗口");
 		m_pPageLogcat->ShowWindow(SW_SHOW);
 		m_pPageLogcat->SetParent(m_pMainContainer);
 		m_pMainContainer->SetBottomWnd(m_pPageLogcat, LOG_WND_HEIGHT);
 		m_pMainContainer->Resize();
 	}
 	else {
-		LOGD("隐藏日志窗口");
 		m_pPageLogcat->ShowWindow(SW_HIDE);
 		m_pPageLogcat->SetParent(this);
 		m_pMainContainer->SetBottomWnd(nullptr, 0);

--
Gitblit v1.9.3