Skip to content

Commit 22d750a

Browse files
Only render custom icons if they are applied
1 parent 2bdf101 commit 22d750a

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

src/toolkit/Community.VisualStudio.Toolkit.Shared/ErrorList/TableEntriesSnapshot.cs

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System.Collections.Generic;
1+
using System;
2+
using System.Collections.Generic;
23
using System.Linq;
34
using Microsoft.VisualStudio.Shell.TableManager;
45

@@ -39,6 +40,15 @@ public override bool TryGetValue(int index, string columnName, out object? conte
3940
return false;
4041
}
4142

43+
if (columnName == StandardTableKeyNames.PriorityImage || columnName == StandardTableKeyNames.ErrorSeverityImage)
44+
{
45+
if (_errors[index].Icon.Guid == Guid.Empty)
46+
{
47+
content = _errors[index].Icon;
48+
return true;
49+
}
50+
}
51+
4252
switch (columnName)
4353
{
4454
case StandardTableKeyNames.ProjectName:
@@ -85,11 +95,6 @@ public override bool TryGetValue(int index, string columnName, out object? conte
8595
content = _errors[index].ErrorCodeToolTip;
8696
break;
8797

88-
case StandardTableKeyNames.PriorityImage:
89-
case StandardTableKeyNames.ErrorSeverityImage:
90-
content = _errors[index].Icon;
91-
break;
92-
9398
default:
9499
content = null;
95100
return false;

0 commit comments

Comments
 (0)