mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 14:02:28 +00:00
Select correct row for new entry regardless of sort order
This commit is contained in:
@@ -377,7 +377,8 @@ NSString *const _MPTAbleSecurCellView = @"PasswordCell";
|
||||
|
||||
- (void)_didAddItem:(NSNotification *)notification {
|
||||
MPDocument *document = [[self windowController] document];
|
||||
NSInteger row = document.selectedGroup.entries.count - 1;
|
||||
KPKEntry *entry = document.selectedGroup.entries.lastObject;
|
||||
NSUInteger row = [self.entryArrayController.arrangedObjects indexOfObject:entry];
|
||||
[self.entryTable scrollRowToVisible:row];
|
||||
[self.entryTable selectRowIndexes:[NSIndexSet indexSetWithIndex:row] byExtendingSelection:NO];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user