From 89b345b33eabe5347d96fe8b5705074251cf1191 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Fri, 19 Jun 2009 11:26:55 +0000 Subject: =?UTF-8?q?=E2=80=A2=20added:=20by=20holding=20=E2=8C=98,=20?= =?UTF-8?q?=E2=87=A7,=20or/and=20=E2=8C=A5=20dragged=20selected=20rows=20w?= =?UTF-8?q?ill=20be=20copied=20as=20SQL=20INSERTS=20(up=20to=20now=20only?= =?UTF-8?q?=20in=20table=20content=20browser)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/TableContent.m | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'Source') 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] -- cgit v1.2.3