aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2009-06-19 11:26:55 +0000
committerBibiko <bibiko@eva.mpg.de>2009-06-19 11:26:55 +0000
commit89b345b33eabe5347d96fe8b5705074251cf1191 (patch)
treef067678164b3133a98d7399691014b74a1eb2372
parenteb0f2c8d21052c328c5c0f6a04a4410905e5956f (diff)
downloadsequelpro-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)
-rw-r--r--Source/TableContent.m12
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]