diff --git a/src/SopHelper.Avalonia/VVMs/RecipeEditor/EditorNodes.cs b/src/SopHelper.Avalonia/VVMs/RecipeEditor/EditorNodes.cs
index ed27a2a..bc8ac38 100644
--- a/src/SopHelper.Avalonia/VVMs/RecipeEditor/EditorNodes.cs
+++ b/src/SopHelper.Avalonia/VVMs/RecipeEditor/EditorNodes.cs
@@ -210,7 +210,7 @@ public class RecipeNode : EditorNode
/// 违规类型下拉候选
public IReadOnlyList ViolationTypes { get; }
- /// 区域名下拉候选(含空项,表示该字段不引用区域)
+ /// 区域名下拉候选快照(含空项,表示该字段不引用区域)。区域键或集合变化后需通知下拉框重新读取。
public IReadOnlyList RegionNames
{
get
@@ -237,6 +237,7 @@ public class RecipeNode : EditorNode
node.Renamed += OnRegionRenamed;
Regions.Add(node);
+ RaisePropertyChanged(nameof(RegionNames));
SelectedRegion = node;
return node;
@@ -254,6 +255,7 @@ public class RecipeNode : EditorNode
foreach (var step in Steps.Where(s => s.Detection is not null && References(s.Detection, node.Key)))
ClearRegionReferences(step.Detection!, node.Key);
+ RaisePropertyChanged(nameof(RegionNames));
SelectedRegion = Regions.FirstOrDefault();
}
diff --git a/tests/Avalonia.Smoke/Program.cs b/tests/Avalonia.Smoke/Program.cs
index b1916c6..d2f35c6 100644
--- a/tests/Avalonia.Smoke/Program.cs
+++ b/tests/Avalonia.Smoke/Program.cs
@@ -1404,7 +1404,7 @@ internal static class Smoke
model.CancelAgentCommand.Execute();
for(var i=0;i<100&&model.IsAgentBusy;i++)await Task.Delay(10);
Check(!model.IsAgentBusy&&model.Recipe.Steps.Count==originalCount,"Cancelling analysis never mutates the recipe");
- Check(editor.GetVisualDescendants().OfType