Skip to content

Commit

Permalink
Merge pull request #145 from kishikawakatsumi/openmenu
Browse files Browse the repository at this point in the history
Fix open context menu never active
  • Loading branch information
kishikawakatsumi authored Sep 19, 2024
2 parents bf18a9a + a941e94 commit e20c9e9
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ extension FilesViewController: NSMenuItemValidation {
case #selector(openContextMenuAction(_:)):
guard targetRows.count == 1 else { return false }
guard let targetRow = targetRows.first else { return false }
guard let _ = outlineView.item(atRow: targetRow) as? FileNode else { return false }
return outlineView.item(atRow: targetRow) is FileNode
case #selector(deleteFileContextMenuAction(_:)):
guard targetRows.count > 0 else { return false }
return targetRows.allSatisfy { outlineView.item(atRow: $0) is FileNode }
Expand All @@ -658,8 +658,6 @@ extension FilesViewController: NSMenuItemValidation {
default:
return false
}

return false
}
}

Expand Down

0 comments on commit e20c9e9

Please sign in to comment.