From 3a628dbf70c595982773145796433ba08677278b Mon Sep 17 00:00:00 2001 From: michael starke Date: Wed, 13 Aug 2014 19:48:36 +0200 Subject: [PATCH] Newly created Group now gets selected in Outline --- MacPass/MPOutlineViewController.m | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/MacPass/MPOutlineViewController.m b/MacPass/MPOutlineViewController.m index 5db89ade..ee537209 100644 --- a/MacPass/MPOutlineViewController.m +++ b/MacPass/MPOutlineViewController.m @@ -164,13 +164,7 @@ NSString *const _MPOutlinveViewHeaderViewIdentifier = @"HeaderCell"; NSIndexPath *groupIndexPath = [group indexPath]; NSTreeNode *groupNode = [[self.treeController arrangedObjects] descendantNodeAtIndexPath:groupIndexPath]; [self.outlineView expandItem:groupNode.parentNode]; - /* TODO: Select created Group - NSUInteger row = 0; - for(NSUInteger index = 0; index < [groupIndexPath length]; index++ ) { - row += [groupIndexPath indexAtPosition:index]; - } - [self.outlineView selectRowIndexes:[NSIndexSet indexSetWithIndex:row] byExtendingSelection:NO]; - */ + [self.outlineView selectRowIndexes:[NSIndexSet indexSetWithIndex:[self.outlineView rowForItem:groupNode]] byExtendingSelection:NO]; } - (id)itemUnderMouse {