Hopefully fix Drag and Drop for everyone

CQTexperiment
Christopher Snowhill 2021-02-06 00:02:55 -08:00
parent dce400435e
commit 583b8f3cb4
1 changed files with 4 additions and 7 deletions

View File

@ -230,15 +230,12 @@
// Get files from a normal file drop (such as from Finder)
if ([bestType isEqualToString:NSPasteboardTypeFileURL]) {
NSMutableArray *urls = [[NSMutableArray alloc] init];
for (NSString *file in
[[info draggingPasteboard] propertyListForType:NSPasteboardTypeFileURL]) {
[urls addObject:[NSURL fileURLWithPath:file]];
}
NSArray<Class> *classes = @[[NSURL class]];
NSDictionary *options = @{};
NSArray<NSURL*> *files = [pboard readObjectsForClasses:classes options:options];
//[playlistLoader insertURLs:urls atIndex:row sort:YES];
[acceptedURLs addObjectsFromArray:urls];
[acceptedURLs addObjectsFromArray:files];
}
// Get files from an iTunes drop