Created groups are now scrolled into view (fixes #231)

This commit is contained in:
michael starke
2014-08-27 19:46:43 +02:00
parent 690849bc11
commit 5fa01f0366

View File

@@ -170,7 +170,9 @@ NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell";
NSIndexPath *groupIndexPath = [group indexPath];
NSTreeNode *groupNode = [[self.treeController arrangedObjects] descendantNodeAtIndexPath:groupIndexPath];
[self.outlineView expandItem:groupNode.parentNode];
[self.outlineView selectRowIndexes:[NSIndexSet indexSetWithIndex:[self.outlineView rowForItem:groupNode]] byExtendingSelection:NO];
NSInteger groupRow = [self.outlineView rowForItem:groupNode];
[self.outlineView selectRowIndexes:[NSIndexSet indexSetWithIndex:groupRow] byExtendingSelection:NO];
[self.outlineView scrollRowToVisible:groupRow];
}
- (id)itemUnderMouse {