Skip to content

Commit 5e5e3a1

Browse files
authored
Merge pull request #5705 from retailcoder/rename_members
Enable Rename command for sub-member Code Explorer nodes (i.e. UDT and Enum members)
2 parents 4965996 + 98943c2 commit 5e5e3a1

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ private bool SpecialEvaluateCanExecute(object parameter)
7474

7575
private bool EvaluateCanExecute(ICodeExplorerNode node)
7676
{
77-
if (!ApplicableNodes.Contains(node.GetType())
78-
|| !(node is CodeExplorerItemViewModel)
79-
|| node.Declaration == null)
77+
if (node?.Declaration == null
78+
|| !ApplicableNodes.Contains(node.GetType())
79+
|| !(node is CodeExplorerItemViewModel))
8080
{
8181
return false;
8282
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public sealed class RenameCommand : CodeExplorerCommandBase
1818
typeof(CodeExplorerProjectViewModel),
1919
typeof(CodeExplorerComponentViewModel),
2020
typeof(CodeExplorerMemberViewModel),
21+
typeof(CodeExplorerSubMemberViewModel),
2122
typeof(CodeExplorerCustomFolderViewModel)
2223
};
2324

0 commit comments

Comments
 (0)