Skip to content

Commit

Permalink
xml summary
Browse files Browse the repository at this point in the history
  • Loading branch information
ivaylo-matov committed Oct 22, 2024
1 parent dd245b5 commit facb963
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions TuneUp/ProfiledNodeViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public string Name
}
else if (GroupModel != null)
{
return GetGroupName(GroupModel.AnnotationText);
return GetProfiledGroupName(GroupModel.AnnotationText);
}
}
return name;
Expand Down Expand Up @@ -423,7 +423,7 @@ public ProfiledNodeViewModel(AnnotationModel group)
/// <param name="group">the annotation model</param>
public ProfiledNodeViewModel(ProfiledNodeViewModel pNode)
{
Name = GetGroupName(pNode.GroupName);
Name = GetProfiledGroupName(pNode.GroupName);
GroupName = pNode.GroupName;
State = pNode.State;
NodeGUID = Guid.NewGuid();
Expand All @@ -433,12 +433,15 @@ public ProfiledNodeViewModel(ProfiledNodeViewModel pNode)
ShowGroupIndicator = true;
}

public static string GetGroupName(string groupName)
/// <summary>
/// Returns the formatted profiled group name with the group prefix.
/// Uses a default display name if the group name matches the default.
/// </summary>
public static string GetProfiledGroupName(string groupName)
{
return groupName == DefaultGroupName
? $"{GroupNodePrefix}{DefaultDisplayGroupName}"
: $"{GroupNodePrefix}{groupName}";
}

}
}
2 changes: 1 addition & 1 deletion TuneUp/TuneUpWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ internal void OnGroupPropertyChanged(object sender, PropertyChangedEventArgs e)
{
if (pNode.IsGroup)
{
pNode.Name = ProfiledNodeViewModel.GetGroupName(groupModel.AnnotationText);
pNode.Name = ProfiledNodeViewModel.GetProfiledGroupName(groupModel.AnnotationText);
}
pNode.GroupName = groupModel.AnnotationText;
}
Expand Down

0 comments on commit facb963

Please sign in to comment.