Skip to content

Commit

Permalink
Fix an exception when pressing return in the table indexes view (fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dmoagx committed Sep 13, 2015
1 parent fa2cd0b commit 42ae68b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Source/SPTableView.m
Expand Up @@ -194,8 +194,9 @@ - (void)keyDown:(NSEvent *)theEvent
(![[[[self delegate] class] description] isEqualToString:@"SPConnectionController"])) {

// Ensure that editing is permitted
if (![[self delegate] tableView:self shouldEditTableColumn:[[self tableColumns] objectAtIndex:0] row:[self selectedRow]]) return;

if(![[self delegate] respondsToSelector:@selector(tableView:shouldEditTableColumn:row:)]) return; // disallow by default
if(![[self delegate] tableView:self shouldEditTableColumn:[[self tableColumns] objectAtIndex:0] row:[self selectedRow]]) return;

// Trigger a cell edit
[self editColumn:0 row:[self selectedRow] withEvent:nil select:YES];

Expand Down

0 comments on commit 42ae68b

Please sign in to comment.