diff --git a/Medianno/MADragging.mm b/Medianno/MADragging.mm index 28fa3a9..1a61c1d 100644 --- a/Medianno/MADragging.mm +++ b/Medianno/MADragging.mm @@ -66,7 +66,19 @@ - (void)registerOurDragTypes { + [annotationTable setDraggingSourceOperationMask:NSDragOperationEvery forLocal:NO]; + [annotationTable setVerticalMotionCanBeginDrag:NO]; + [annotationTable registerForDraggedTypes: + [NSArray arrayWithObjects:kMADragType, kUTTypeUTF8PlainText, nil]]; +} + +- (BOOL)tableView:(NSTableView *)tableView writeRowsWithIndexes:(NSIndexSet *)rowIndexes toPasteboard:(NSPasteboard *)pboard +{ + NSArray * objects = [[annotationController arrangedObjects] objectsAtIndexes:rowIndexes]; + [pboard clearContents]; + [pboard writeObjects:[NSArray arrayWithObject:[MAPasteboardData pasteboardDataWithArray:objects]]]; + return YES; } @end @@ -78,7 +90,7 @@ [tagTable setDraggingSourceOperationMask:NSDragOperationEvery forLocal:NO]; [tagTable setVerticalMotionCanBeginDrag:NO]; [tagTable registerForDraggedTypes: - [NSArray arrayWithObjects:kMADragType, NSStringPboardType, nil]]; + [NSArray arrayWithObjects:kMADragType, kUTTypeUTF8PlainText, nil]]; } - (BOOL)tableView:(NSTableView *)tableView writeRowsWithIndexes:(NSIndexSet *)rowIndexes toPasteboard:(NSPasteboard *)pboard @@ -89,4 +101,5 @@ return YES; } + @end