From 5fa01f0366c504f7e203be42d780e55d94384447 Mon Sep 17 00:00:00 2001 From: michael starke Date: Wed, 27 Aug 2014 19:46:43 +0200 Subject: [PATCH] Created groups are now scrolled into view (fixes #231) --- MacPass/MPOutlineViewController.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MacPass/MPOutlineViewController.m b/MacPass/MPOutlineViewController.m index ed17e505..639e8520 100644 --- a/MacPass/MPOutlineViewController.m +++ b/MacPass/MPOutlineViewController.m @@ -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 {