From 56d92f02caa0e5bffb36a8f46446d297b0baf730 Mon Sep 17 00:00:00 2001
From: LAPTOP-SNT8I5JK\Boounion <Chenluhua@qq.com>
Date: 星期一, 23 六月 2025 15:15:59 +0800
Subject: [PATCH] 1.配方列表,搜索框,UI调整,未添加搜索功能;

---
 SourceCode/Bond/Servo/CStep.cpp |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/SourceCode/Bond/Servo/CStep.cpp b/SourceCode/Bond/Servo/CStep.cpp
index 0597e6e..4ac3dfd 100644
--- a/SourceCode/Bond/Servo/CStep.cpp
+++ b/SourceCode/Bond/Servo/CStep.cpp
@@ -91,6 +91,22 @@
 		m_attributeVector.addAttribute(pAttribute, TRUE);
 	}
 
+	void CStep::addAttributeVector(CAttributeVector& attributeVector)
+	{
+		// 添加attribute时,要前删除存在的同名的attribute
+		std::vector<CAttribute*>& srcs = attributeVector.getAttributes();
+		auto it = srcs.begin();
+		while (it != srcs.end()) {
+			BOOL bAdd = m_attributeVector.addAttribute((*it), TRUE);
+			if (bAdd) {
+				it = srcs.erase(it);
+			}
+			else {
+				++it;
+			}
+		}
+	}
+
 	void CStep::convertString(const char* pszBuffer, int size, std::string& strOut)
 	{
 		strOut.clear();

--
Gitblit v1.9.3