diff options
author | Bibiko <bibiko@eva.mpg.de> | 2009-06-19 11:26:55 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2009-06-19 11:26:55 +0000 |
commit | 89b345b33eabe5347d96fe8b5705074251cf1191 (patch) | |
tree | f067678164b3133a98d7399691014b74a1eb2372 /Source | |
parent | eb0f2c8d21052c328c5c0f6a04a4410905e5956f (diff) | |
download | sequelpro-89b345b33eabe5347d96fe8b5705074251cf1191.tar.gz sequelpro-89b345b33eabe5347d96fe8b5705074251cf1191.tar.bz2 sequelpro-89b345b33eabe5347d96fe8b5705074251cf1191.zip |
• added: by holding ⌘, ⇧, or/and ⌥ dragged selected rows will be copied as SQL INSERTS (up to now only in table content browser)
Diffstat (limited to 'Source')
-rw-r--r-- | Source/TableContent.m | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Source/TableContent.m b/Source/TableContent.m index 4d68ce1f..46fde6b3 100644 --- a/Source/TableContent.m +++ b/Source/TableContent.m @@ -2387,9 +2387,17 @@ objectValueForTableColumn:(NSTableColumn *)aTableColumn { if ( tableView == tableContentView ) { - NSString *tmp = [tableContentView draggedRowsAsTabString:rows]; + + NSString *tmp; + + // By holding ⌘, ⇧, or/and ⌥ copies selected rows as SQL INSERTS + // otherwise \t delimited lines + if([[NSApp currentEvent] modifierFlags] & (NSCommandKeyMask|NSShiftKeyMask|NSAlternateKeyMask)) + tmp = [tableContentView selectedRowsAsSqlInserts]; + else + tmp = [tableContentView draggedRowsAsTabString:rows]; - if ( nil != tmp ) + if ( nil != tmp && [tmp length] ) { [pboard declareTypes:[NSArray arrayWithObjects: NSTabularTextPboardType, NSStringPboardType, nil] |