mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 12:52:21 +00:00
Fixed exit Search issues
Exiting search now clears matching entries when no group was preselected (use case is opening a DB and then search without selecting a group) Deleting a group now correctly deselects the group. Previously the inspector still showed the group, but the outline view did not show any selection.
This commit is contained in:
@@ -328,8 +328,10 @@ NSString *const _MPTAbleSecurCellView = @"PasswordCell";
|
||||
- (void)_didChangeCurrentItem:(NSNotification *)notification {
|
||||
MPDocument *document = [notification object];
|
||||
|
||||
if(!document.selectedGroup) {
|
||||
/* TODO: handle deleted item */
|
||||
if(!document.selectedGroup && !document.hasSearch) {
|
||||
/* no group selection out of search is wrong */
|
||||
[self.entryArrayController unbind:NSContentArrayBinding];
|
||||
[self.entryArrayController setContent:nil];
|
||||
return;
|
||||
}
|
||||
/*
|
||||
@@ -384,6 +386,10 @@ NSString *const _MPTAbleSecurCellView = @"PasswordCell";
|
||||
[[self.entryTable tableColumnWithIdentifier:MPEntryTableParentColumnIdentifier] setHidden:YES];
|
||||
MPDocument *document = [[self windowController] document];
|
||||
document.selectedItem = document.selectedGroup;
|
||||
if( nil == document.selectedItem && nil == document.selectedGroup ) {
|
||||
[self.entryArrayController unbind:NSContentArrayBinding];
|
||||
[self.entryArrayController setContent:nil];
|
||||
}
|
||||
[self _updateContextBar];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user