X-Git-Url: https://git.yukkurigames.com/?p=enjoyable.git;a=blobdiff_plain;f=ConfigsController.m;h=f6770cc78dbffbfb365188f47a67cc36ff465e55;hp=ce58f07a7180f56222e9b20168f241d9db64a8d5;hb=912756bc7342b277d9648a4a128dbfc1a3d53d77;hpb=0e4bf29455987fd95d2eb2b88cdec407e86e4c9b diff --git a/ConfigsController.m b/ConfigsController.m index ce58f07..f6770cc 100644 --- a/ConfigsController.m +++ b/ConfigsController.m @@ -45,7 +45,7 @@ [removeButton setEnabled: ![config protect]]; [targetController load]; [(ApplicationController *)[[NSApplication sharedApplication] delegate] configChanged]; - [tableView selectRow: [configs indexOfObject: config] byExtendingSelection: NO]; + [tableView selectRowIndexes:[NSIndexSet indexSetWithIndex:[configs indexOfObject:config]] byExtendingSelection:NO]; } -(IBAction) addPressed: (id)sender { @@ -54,7 +54,7 @@ [configs addObject: newConfig]; [(ApplicationController *)[[NSApplication sharedApplication] delegate] configsChanged]; [tableView reloadData]; - [tableView selectRow: ([configs count]-1) byExtendingSelection: NO]; + [tableView selectRowIndexes:[NSIndexSet indexSetWithIndex:configs.count - 1] byExtendingSelection:NO]; [tableView editColumn: 0 row:([configs count]-1) withEvent:nil select:YES]; } -(IBAction) removePressed: (id)sender {