Skip to content

Commit eadf2a9

Browse files
committed
made the warning persistent and then add removal code
1 parent f86f8bc commit eadf2a9

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/Libraries/CoreNodeModels/Selection.cs

+7-3
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ protected SelectionBase(
161161

162162
Prefix = prefix;
163163

164-
Warning(Resources.SelectionNodeNothingSelected);
164+
Warning(Resources.SelectionNodeNothingSelected, true);
165165

166166
ShouldDisplayPreviewCore = true;
167167
}
@@ -220,9 +220,13 @@ public override void ClearErrorsAndWarnings()
220220
private void SetSelectionNodeState()
221221
{
222222
if (null == selectionResults || selectionResults.Count == 0)
223+
{
223224
State = ElementState.Warning;
224-
else if (State == ElementState.Warning)
225-
State = ElementState.Active;
225+
}
226+
else if (State == ElementState.Warning || State == ElementState.PersistentWarning)
227+
{
228+
base.ClearErrorsAndWarnings();
229+
}
226230
}
227231

228232
public bool CanBeginSelect()

0 commit comments

Comments
 (0)