From fa148cdf427762527d37fc65f9eedc90debaa04d Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Fri, 25 Oct 2024 09:01:59 +0800 Subject: [PATCH] Bug fix --- v2rayN/ServiceLib/ViewModels/RoutingRuleSettingViewModel.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/v2rayN/ServiceLib/ViewModels/RoutingRuleSettingViewModel.cs b/v2rayN/ServiceLib/ViewModels/RoutingRuleSettingViewModel.cs index 6e452d82..1e678776 100644 --- a/v2rayN/ServiceLib/ViewModels/RoutingRuleSettingViewModel.cs +++ b/v2rayN/ServiceLib/ViewModels/RoutingRuleSettingViewModel.cs @@ -176,13 +176,14 @@ namespace ServiceLib.ViewModels return; } - var lst = new List(); + var lst = new List(); foreach (var it in SelectedSources ?? [SelectedSource]) { var item = _rules.FirstOrDefault(t => t.Id == it?.Id); if (item != null) { - var item2 = JsonUtils.Deserialize(JsonUtils.Serialize(item)); + var item2 = JsonUtils.DeepCopy(item); //JsonUtils.Deserialize(JsonUtils.Serialize(item)); + item2.Id = null; lst.Add(item2 ?? new()); } }