Skip to content

Commit dbeab72

Browse files
committed
Add template components first as ClassModules
This works for VBA, but I have no idea if it breaks in VB6.
1 parent 1056ef8 commit dbeab72

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Rubberduck.Core/UI/CodeExplorer/Commands/AddTemplateCommand.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ public AddTemplateCommand(ICodeExplorerAddComponentService addComponentService,
4242

4343
public IEnumerable<ProjectType> AllowableProjectTypes => ApplicableProjectTypes;
4444

45-
public ComponentType ComponentType => ComponentType.Undefined;
45+
//We need a valid component type to add the component in the first place. Then the module content gets overwritten.
46+
public ComponentType ComponentType => ComponentType.ClassModule;
4647

4748
public bool CanExecuteForNode(ICodeExplorerNode model)
4849
{

0 commit comments

Comments
 (0)