mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-13 21:42:32 +00:00
Fixed issue with entry context menu displaying wrong attachments and custom attributes
This commit is contained in:
@@ -46,9 +46,10 @@ static NSUInteger const kMPAttachmentsMenuItem = 2000;
|
||||
if([lastItem isSeparatorItem]) {
|
||||
[menu removeItem:lastItem];
|
||||
}
|
||||
MPDocument *document = [[NSDocumentController sharedDocumentController] currentDocument];
|
||||
|
||||
KPKEntry *entry = document.selectedEntry;
|
||||
/* since we can get opend on the non-selected entry, we have to resolve the target node */
|
||||
id<MPTargetNodeResolving> entryResolver = [NSApp targetForAction:@selector(currentTargetEntry)];
|
||||
KPKEntry *entry = [entryResolver currentTargetEntry];
|
||||
|
||||
if([entry.customAttributes count] > 0) {
|
||||
[menu addItem:[NSMenuItem separatorItem]];
|
||||
NSMenuItem *attributeItem = [[NSMenuItem alloc] init];
|
||||
|
||||
Reference in New Issue
Block a user