From f25db6b4188d33ea7bcd91f048207b329387012b Mon Sep 17 00:00:00 2001 From: Michael Starke Date: Mon, 4 Jan 2021 20:49:48 +0100 Subject: [PATCH] Fixed regression of newly created entry not being properly selected --- MacPass/MPEntryViewController.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/MacPass/MPEntryViewController.m b/MacPass/MPEntryViewController.m index 261cbf6a..7f6ed17a 100644 --- a/MacPass/MPEntryViewController.m +++ b/MacPass/MPEntryViewController.m @@ -475,6 +475,10 @@ NSString *const _MPTableSecurCellView = @"PasswordCell"; NSUInteger row = [self.entryArrayController.arrangedObjects indexOfObject:entry]; [self.entryTable scrollRowToVisible:row]; [self.entryTable selectRowIndexes:[NSIndexSet indexSetWithIndex:row] byExtendingSelection:NO]; + // since we do not update the current selection when the table view is not first responder, do it here manually + if(self.entryTable.window.firstResponder != self.entryTable) { + document.selectedEntries = self.entryArrayController.selectedObjects; + } } - (void)_didUpdateSearchResults:(NSNotification *)notification {