File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
RetailCoder.VBE/UI/Command/MenuItems Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change
1
+ using Rubberduck . Parsing . VBA ;
1
2
using Rubberduck . UI . Command . MenuItems . ParentMenus ;
2
3
3
4
namespace Rubberduck . UI . Command . MenuItems
@@ -9,6 +10,8 @@ public CodeExplorerCommandMenuItem(CommandBase command)
9
10
{
10
11
}
11
12
13
+ public override bool EvaluateCanExecute ( RubberduckParserState state ) => true ;
14
+
12
15
public override string Key => "RubberduckMenu_CodeExplorer" ;
13
16
public override int DisplayOrder => ( int ) NavigationMenuItemDisplayOrder . CodeExplorer ;
14
17
}
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ public virtual Func<string> ToolTipText
47
47
/// <remarks>Returns <c>true</c> if not overridden.</remarks>
48
48
public virtual bool EvaluateCanExecute ( RubberduckParserState state )
49
49
{
50
- return state != null && _command . CanExecute ( state ) ;
50
+ return state != null && ( _command ? . CanExecute ( state ) ?? false ) ;
51
51
}
52
52
53
53
public virtual ButtonStyle ButtonStyle => ButtonStyle . IconAndCaption ;
You can’t perform that action at this time.
0 commit comments