aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-03-26 21:37:42 +0000
committerBibiko <bibiko@eva.mpg.de>2010-03-26 21:37:42 +0000
commitf1d7f71bca0abd24f16d65279d0431e8d6678a8e (patch)
tree0892658988ef1b12e2ba81efd42e616c73f6e045
parentf5edb22564ec1c3e834f20fd080a84ce581acfe4 (diff)
downloadsequelpro-f1d7f71bca0abd24f16d65279d0431e8d6678a8e.tar.gz
sequelpro-f1d7f71bca0abd24f16d65279d0431e8d6678a8e.tar.bz2
sequelpro-f1d7f71bca0abd24f16d65279d0431e8d6678a8e.zip
fixed issue while selecting a db name in navigator which wasn't queried yet
-rw-r--r--Source/SPNavigatorController.m4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/SPNavigatorController.m b/Source/SPNavigatorController.m
index c5c6463d..8c460a91 100644
--- a/Source/SPNavigatorController.m
+++ b/Source/SPNavigatorController.m
@@ -228,7 +228,9 @@ static SPNavigatorController *sharedNavigatorController = nil;
[outlineSchema2 scrollRowToVisible:[outlineSchema2 selectedRow]];
id item = [outlineSchema2 selectedItem];
// Try to scroll the view that all children of schemaPath are visible if possible
- NSInteger cnt = [item count]+1;
+ NSInteger cnt = 1;
+ if([item isKindOfClass:[NSDictionary class]] || [item isKindOfClass:[NSArray class]])
+ cnt = [item count]+1;
NSRange r = [outlineSchema2 rowsInRect:[outlineSchema2 visibleRect]];
NSInteger offset = (cnt > r.length) ? (r.length-2) : cnt;
offset += [outlineSchema2 selectedRow];