Skip to content

Commit

Permalink
made the warning persistent and then add removal code
Browse files Browse the repository at this point in the history
  • Loading branch information
zeusongit committed Jan 16, 2024
1 parent f86f8bc commit eadf2a9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/Libraries/CoreNodeModels/Selection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ protected SelectionBase(

Prefix = prefix;

Warning(Resources.SelectionNodeNothingSelected);
Warning(Resources.SelectionNodeNothingSelected, true);

ShouldDisplayPreviewCore = true;
}
Expand Down Expand Up @@ -220,9 +220,13 @@ public override void ClearErrorsAndWarnings()
private void SetSelectionNodeState()
{
if (null == selectionResults || selectionResults.Count == 0)
{
State = ElementState.Warning;
else if (State == ElementState.Warning)
State = ElementState.Active;
}
else if (State == ElementState.Warning || State == ElementState.PersistentWarning)
{
base.ClearErrorsAndWarnings();
}
}

public bool CanBeginSelect()
Expand Down

0 comments on commit eadf2a9

Please sign in to comment.