Skip to content

Commit b6aa90c

Browse files
committed
Fix default and predeclared icons.
1 parent 8263002 commit b6aa90c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Rubberduck.Core/Navigation/CodeExplorer/CodeExplorerComponentViewModel.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ public bool IsTestModule
168168
$"{_name}{(IsPredeclared ? " (Predeclared)" : string.Empty)}";
169169

170170
private bool IsPredeclared => Declaration != null &&
171-
Declaration.Attributes.HasPredeclaredIdAttribute(out _) &&
172-
Declaration.IsUserDefined;
171+
DeclarationType == DeclarationType.ClassModule &&
172+
Declaration.Attributes.HasPredeclaredIdAttribute(out _);
173173

174174
public override QualifiedSelection? QualifiedSelection => Declaration.QualifiedSelection;
175175

@@ -238,6 +238,7 @@ private void SetIcon()
238238
if (Icons.ContainsKey(DeclarationType))
239239
{
240240
_icon = Icons[DeclarationType];
241+
return;
241242
}
242243

243244
_icon = OopsIcon;

0 commit comments

Comments
 (0)