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:
michael starke
2014-08-18 12:23:11 +02:00
parent 6231e192af
commit 019e64a926
2 changed files with 15 additions and 3 deletions

View File

@@ -247,7 +247,6 @@ NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell";
id representedObject = [item representedObject];
if([representedObject isKindOfClass:[KPKGroup class]]) {
KPKGroup *group = (KPKGroup *)representedObject;
NSLog(@"IndexPath for %@: %@ vs. %@", group.name, [item indexPath], [group indexPath]);
group.isExpanded = YES;
}
}
@@ -261,6 +260,13 @@ NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell";
}
}
- (void)outlineView:(NSOutlineView *)outlineView didRemoveRowView:(NSTableRowView *)rowView forRow:(NSInteger)row {
/* Deletion of an item */
if(row == -1) {
[self outlineViewSelectionDidChange:nil];
}
}
#pragma mark Validation
- (BOOL)validateMenuItem:(NSMenuItem *)menuItem {
MPDocument *document = [[self windowController] document];