Skip to content

Commit

Permalink
hidden when no sub menu
Browse files Browse the repository at this point in the history
  • Loading branch information
ikas-mc committed Nov 20, 2021
1 parent 8a727cf commit 5734596
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,21 @@ IFACEMETHODIMP CustomExplorerCommand::GetState(_In_opt_ IShellItemArray* selecti

if (okToBeSlow)
{
*cmdState = ECS_ENABLED;
if (selection) {
wil::unique_cotaskmem_string path = GetPath(selection);
if (path.is_valid()) {
m_current_path = path.get();
}
}

ReadCommands(m_current_path);
hr = S_OK;

if (m_commands.size() == 0) {
*cmdState = ECS_HIDDEN;
}
else {
*cmdState = ECS_ENABLED;
}
}
else
{
Expand Down

0 comments on commit 5734596

Please sign in to comment.