Clicking a ‘find all’ result would be handled twice

Normally this wouldn’t be noticed, as the second action would do the same as the first (go to the result in the associated project window), but when there was no project window a new window opens (to show the result), and that would be done twice.

This fixes issue #281.

There is still an issue with successive selections for the “no project window” situation, as each time, a new window is opened, rather than reuse the first one that opened.
This commit is contained in:
Allan Odgaard
2013-01-06 15:31:10 +01:00
parent 1a3c9d5db9
commit d96dbc4269

View File

@@ -1119,6 +1119,11 @@ Any other string:
}
- (void)didSingleClickFindAllResults:(id)sender
{
// This is implicitly handled by outlineViewSelectionDidChange:
}
- (void)outlineViewSelectionDidChange:(NSNotification*)aNotification
{
if([findAllResultsOutlineView numberOfSelectedRows] == 1)
{
@@ -1128,11 +1133,6 @@ Any other string:
}
}
- (void)outlineViewSelectionDidChange:(NSNotification*)aNotification
{
[self didSingleClickFindAllResults:self];
}
- (BOOL)commitEditing
{
id oldResponder = [[self window] firstResponder];