aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TablesList.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-04-07 20:27:08 +0000
committerBibiko <bibiko@eva.mpg.de>2010-04-07 20:27:08 +0000
commit965abac73b603c464dc9d58ce4778f239ff6e2b9 (patch)
tree4a2370b1895f0784e895ddc7a5ab5e90482637dd /Source/TablesList.m
parentc58984f7fb82a089bdc508f0bdf7dc6df89cb979 (diff)
downloadsequelpro-965abac73b603c464dc9d58ce4778f239ff6e2b9.tar.gz
sequelpro-965abac73b603c464dc9d58ce4778f239ff6e2b9.tar.bz2
sequelpro-965abac73b603c464dc9d58ce4778f239ff6e2b9.zip
• improved querying db structure handling
- distinguish between any update tables list invoked by SP which causes a weak and quick refresh if nothing was changed and if the user pressed Table List Refresh button explicitly which will cancel any current db querying and pending ones
Diffstat (limited to 'Source/TablesList.m')
-rw-r--r--Source/TablesList.m7
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/TablesList.m b/Source/TablesList.m
index 1644c13d..bced6366 100644
--- a/Source/TablesList.m
+++ b/Source/TablesList.m
@@ -252,7 +252,12 @@
if (previousSelectedTable) [previousSelectedTable release];
// Query the structure of all databases in the background
- [NSThread detachNewThreadSelector:@selector(queryDbStructureWithUserInfo:) toTarget:mySQLConnection withObject:nil];
+ if(sender == self)
+ // Invoked by SP
+ [NSThread detachNewThreadSelector:@selector(queryDbStructureWithUserInfo:) toTarget:mySQLConnection withObject:nil];
+ else
+ // User press refresh button ergo force update
+ [NSThread detachNewThreadSelector:@selector(queryDbStructureWithUserInfo:) toTarget:mySQLConnection withObject:[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:YES], @"forceUpdate", [NSNumber numberWithBool:YES], @"cancelQuerying", nil]];
}