Skip to content

Commit

Permalink
Improve the behaviour while the search finishes.
Browse files Browse the repository at this point in the history
  • Loading branch information
beelsebob committed Dec 24, 2012
1 parent 9b3de03 commit 68429a2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Stash/STAAppDelegate.m
Expand Up @@ -540,12 +540,11 @@ - (IBAction)search:(id)sender
{
[[self results] addObject:symbol];
[self setSortedResults:[[self results] sortedArrayUsingSelector:@selector(compare:)]];
[[self resultsTable] reloadData];
if ([[self resultsTable] selectedRow] == -1)
[[self resultsTable] insertRowsAtIndexes:[NSIndexSet indexSetWithIndex:[[self sortedResults] indexOfObject:symbol]] withAnimation:0];
if ([[self resultsTable] selectedRow] != 0)
{
[[self resultsTable] selectRowIndexes:[NSIndexSet indexSetWithIndex:0] byExtendingSelection:NO];
}
[self tableViewSelectionDidChange:nil];
}
});
}];
Expand Down

0 comments on commit 68429a2

Please sign in to comment.