aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPNarrowDownCompletion.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-04-06 18:13:31 +0000
committerBibiko <bibiko@eva.mpg.de>2010-04-06 18:13:31 +0000
commit5733c4492539c132dab6f11219803627c08465cd (patch)
tree737f63690fd54438ab747f1cd8f33ff3c4d68d1c /Source/SPNarrowDownCompletion.m
parent2b1c1fb175ef5702ee00e5285226e642039b4afd (diff)
downloadsequelpro-5733c4492539c132dab6f11219803627c08465cd.tar.gz
sequelpro-5733c4492539c132dab6f11219803627c08465cd.tar.bz2
sequelpro-5733c4492539c132dab6f11219803627c08465cd.zip
• overlapping of completion windows after refreshing its content if db structure fetching was finished
- for some reasons it could happen that the timer? fires twice, to avoid this changed the re-invocation strategy
Diffstat (limited to 'Source/SPNarrowDownCompletion.m')
-rw-r--r--Source/SPNarrowDownCompletion.m10
1 files changed, 7 insertions, 3 deletions
diff --git a/Source/SPNarrowDownCompletion.m b/Source/SPNarrowDownCompletion.m
index 1e6a9247..3de3067f 100644
--- a/Source/SPNarrowDownCompletion.m
+++ b/Source/SPNarrowDownCompletion.m
@@ -171,7 +171,7 @@
[stateTimer release];
stateTimer = nil;
if(syncArrowImages) [syncArrowImages release];
- [self performSelectorOnMainThread:@selector(reInvokeCompletion) withObject:nil waitUntilDone:NO];
+ [self performSelectorOnMainThread:@selector(reInvokeCompletion) withObject:nil waitUntilDone:YES];
closeMe = YES;
return;
}
@@ -184,10 +184,14 @@
- (void)reInvokeCompletion
{
+ if(stateTimer) {
+ [stateTimer invalidate];
+ [stateTimer release];
+ stateTimer = nil;
+ }
[theView setCompletionIsOpen:NO];
[self close];
- usleep(70);
- [theView doCompletionByUsingSpellChecker:dictMode fuzzyMode:fuzzyMode autoCompleteMode:NO];
+ [theView performSelector:@selector(refreshCompletion) withObject:nil afterDelay:0.0];
}
- (id)initWithItems:(NSArray*)someSuggestions alreadyTyped:(NSString*)aUserString staticPrefix:(NSString*)aStaticPrefix