From 80075a89316729927db0ad65ca7674f81a942a93 Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期三, 26 七月 2023 09:22:41 +0800 Subject: [PATCH] Merge branch 'Dev-Branch' into wjc --- HDL_ON/Entity/Function/Function.cs | 20 +++++++++++--------- 1 files changed, 11 insertions(+), 9 deletions(-) diff --git a/HDL_ON/Entity/Function/Function.cs b/HDL_ON/Entity/Function/Function.cs index 5b7f073..8e8602b 100644 --- a/HDL_ON/Entity/Function/Function.cs +++ b/HDL_ON/Entity/Function/Function.cs @@ -803,25 +803,27 @@ var list = new List<FunctionAttributes>(); if (spk == SPK.GroupControl) { - var gc = FunctionList.List.groupControls.Find((obj) => obj.sid == sid); - if (gc != null) + lock (list) { - foreach (var temp in gc.sids) + var gc = FunctionList.List.groupControls.Find((obj) => obj.sid == sid); + if (gc != null) { - var light = FunctionList.List.GetLightList().Find((obj) => obj.sid == temp.sid); - if (light != null) + foreach (var temp in gc.sids) { - foreach (var attr in light.attributes) + var light = FunctionList.List.GetLightList().Find((obj) => obj.sid == temp.sid); + if (light != null) { - if (list.Find((obj) => obj.key == attr.key) == null) + foreach (var attr in light.attributes) { - list.Add(attr); + if (list.Find((obj) => obj.key == attr.key) == null) + { + list.Add(attr); + } } } } } } - } else { -- Gitblit v1.8.0