From c47d215a1bdcd08fed94077cf95c5bc13a3099bb Mon Sep 17 00:00:00 2001 From: michael starke Date: Fri, 29 Sep 2017 13:24:46 +0200 Subject: [PATCH] enhanced right click target resolving in entry table If an item is right clicked, it would be the target of an action regardless of selection, now, if there is a selection and the right-clicked item is contained in this selection, every item is the target, otherwise, only the right clicked target is used. --- MacPass/MPEntryViewController.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MacPass/MPEntryViewController.m b/MacPass/MPEntryViewController.m index eafe9c8f..05e008ea 100644 --- a/MacPass/MPEntryViewController.m +++ b/MacPass/MPEntryViewController.m @@ -391,7 +391,9 @@ NSString *const _MPTableSecurCellView = @"PasswordCell"; - (NSArray *)currentTargetEntries { NSInteger activeRow = self.entryTable.clickedRow; if(activeRow > -1 && activeRow < [self.entryArrayController.arrangedObjects count]) { - return @[ [self.entryArrayController arrangedObjects][activeRow] ]; + if(![self.entryArrayController.selectionIndexes containsIndex:activeRow]) { + return @[ [self.entryArrayController arrangedObjects][activeRow] ]; + } } return self.entryArrayController.selectedObjects; }