diff options
author | Bibiko <bibiko@eva.mpg.de> | 2010-08-15 15:03:19 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2010-08-15 15:03:19 +0000 |
commit | 561fad23dfb635f76878c580ce4c132c15614276 (patch) | |
tree | 2674b171a325a01b4b57e5f7eb2b953cf4f81141 | |
parent | 5dc4311e9a135ba86b57972240db8ee25b5e77bd (diff) | |
download | sequelpro-561fad23dfb635f76878c580ce4c132c15614276.tar.gz sequelpro-561fad23dfb635f76878c580ce4c132c15614276.tar.bz2 sequelpro-561fad23dfb635f76878c580ce4c132c15614276.zip |
• forgotten to commit missing changes to commit 2534
-rw-r--r-- | Source/SPTablesList.h | 1 | ||||
-rw-r--r-- | Source/SPTablesList.m | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/Source/SPTablesList.h b/Source/SPTablesList.h index d85235ab..5b20c270 100644 --- a/Source/SPTablesList.h +++ b/Source/SPTablesList.h @@ -127,6 +127,7 @@ // Getters - (NSArray *)selectedTableNames; - (NSArray *)selectedTableItems; +- (NSArray *)selectedTableTypes; - (NSString *)tableName; - (NSInteger)tableType; - (NSArray *)tables; diff --git a/Source/SPTablesList.m b/Source/SPTablesList.m index bd428cbf..bd3d82b6 100644 --- a/Source/SPTablesList.m +++ b/Source/SPTablesList.m @@ -1108,6 +1108,20 @@ return selTables; } +- (NSArray *)selectedTableTypes +{ + NSIndexSet *indexes = [tablesListView selectedRowIndexes]; + + NSUInteger currentIndex = [indexes firstIndex]; + NSMutableArray *selTables = [NSMutableArray array]; + + while (currentIndex != NSNotFound) { + [selTables addObject:[filteredTableTypes objectAtIndex:currentIndex]]; + currentIndex = [indexes indexGreaterThanIndex:currentIndex]; + } + return selTables; +} + /** * Returns the currently selected table or nil if no table or mulitple tables are selected */ |