mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 11:42:30 +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]) {
|
if([lastItem isSeparatorItem]) {
|
||||||
[menu removeItem:lastItem];
|
[menu removeItem:lastItem];
|
||||||
}
|
}
|
||||||
MPDocument *document = [[NSDocumentController sharedDocumentController] currentDocument];
|
/* 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];
|
||||||
|
|
||||||
KPKEntry *entry = document.selectedEntry;
|
|
||||||
if([entry.customAttributes count] > 0) {
|
if([entry.customAttributes count] > 0) {
|
||||||
[menu addItem:[NSMenuItem separatorItem]];
|
[menu addItem:[NSMenuItem separatorItem]];
|
||||||
NSMenuItem *attributeItem = [[NSMenuItem alloc] init];
|
NSMenuItem *attributeItem = [[NSMenuItem alloc] init];
|
||||||
|
|||||||
Reference in New Issue
Block a user