Permalink
Browse files

Make pages selectable

  • Loading branch information...
1 parent 0f80c62 commit 5f660f751e90c4aa02d9d72be5e55f10cb647f63 @dmdeller committed Dec 14, 2011
Showing with 4 additions and 10 deletions.
  1. +1 −8 Launchpad Editor/HNOutlineViewController.m
  2. +3 −2 Launchpad Editor/HNToolbarController.m
@@ -356,14 +356,7 @@ - (BOOL)outlineView:(NSOutlineView *)outlineView acceptDrop:(id <NSDraggingInfo>
- (BOOL)outlineView:(NSOutlineView *)outlineView shouldSelectItem:(id)item
{
- if ([item isKindOfClass:[HNLaunchpadPage class]])
- {
- return NO;
- }
- else
- {
- return YES;
- }
+ return YES;
}
- (BOOL)outlineView:(NSOutlineView *)outlineView shouldEditTableColumn:(NSTableColumn *)tableColumn item:(id)item
@@ -185,8 +185,9 @@ - (void)addGroup
[self.appDelegate.outlineView reloadItem:insertIntoPage reloadChildren:YES];
// highlight new row for editing, to suggest that the user should rename it
- [self.appDelegate.outlineView selectRowIndexes:[NSIndexSet indexSetWithIndex:(self.appDelegate.outlineView.selectedRow - 1)] byExtendingSelection:NO];
- [self.appDelegate.outlineView editColumn:0 row:(self.appDelegate.outlineView.selectedRow) withEvent:nil select:YES];
+ NSInteger row = [self.appDelegate.outlineView rowForItem:newGroup];
+ [self.appDelegate.outlineView selectRowIndexes:[NSIndexSet indexSetWithIndex:row] byExtendingSelection:NO];
+ [self.appDelegate.outlineView editColumn:0 row:row withEvent:nil select:YES];
}
#pragma mark -

0 comments on commit 5f660f7

Please sign in to comment.