mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 08:12:28 +00:00
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.
This commit is contained in:
@@ -391,7 +391,9 @@ NSString *const _MPTableSecurCellView = @"PasswordCell";
|
|||||||
- (NSArray<KPKEntry *> *)currentTargetEntries {
|
- (NSArray<KPKEntry *> *)currentTargetEntries {
|
||||||
NSInteger activeRow = self.entryTable.clickedRow;
|
NSInteger activeRow = self.entryTable.clickedRow;
|
||||||
if(activeRow > -1 && activeRow < [self.entryArrayController.arrangedObjects count]) {
|
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;
|
return self.entryArrayController.selectedObjects;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user