From 2070871df480a664c9c4e38bc4e4e324682a64c6 Mon Sep 17 00:00:00 2001
From: mrDarker <mr.darker@163.com>
Date: 星期四, 03 四月 2025 16:12:28 +0800
Subject: [PATCH] 1. 解决 WebView2 控制器创建失败时闪退的问题 2. 解决连接图销毁时保存设备图形数据闪退的问题

---
 SourceCode/Bond/Servo/ServoDlg.cpp |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/SourceCode/Bond/Servo/ServoDlg.cpp b/SourceCode/Bond/Servo/ServoDlg.cpp
index 5d96844..8babfd8 100644
--- a/SourceCode/Bond/Servo/ServoDlg.cpp
+++ b/SourceCode/Bond/Servo/ServoDlg.cpp
@@ -218,11 +218,10 @@
 	SetIcon(m_hIcon, FALSE);		// 设置小图标
 
 
-									// 菜单
+	// 菜单
 	CMenu menu;
 	menu.LoadMenu(IDR_MENU_APP);
 	SetMenu(&menu);
-
 
 
 	// Tab
@@ -230,6 +229,7 @@
 	m_pPageGraph1->Create(IDD_PAGE_GRAPH1, this);
 	m_pPageGraph2 = new CPageGraph2();
 	m_pPageGraph2->Create(IDD_PAGE_GRAPH2, this);
+
 
 	CHmTab* m_pTab = CHmTab::Hook(GetDlgItem(IDC_TAB1)->m_hWnd);
 	m_pTab->SetPaddingLeft(20);
@@ -249,7 +249,6 @@
 	m_pPanelAttributes = new CPanelAttributes();
 	m_pPanelAttributes->Create(IDD_PANEL_ATTRIBUTES, this);
 	
-
 
 	// 调整初始窗口位置
 	CRect rcWnd;
@@ -275,6 +274,10 @@
 	theApp.m_model.m_master.init();
 
 
+	// 初始化master以后需要控件绑定数据
+	m_pPageGraph1->BindEquipmentToGraph();
+
+
 	return TRUE;  // 除非将焦点设置到控件,否则返回 TRUE
 }
 

--
Gitblit v1.9.3