Skip to content
Snippets Groups Projects
Commit a7557946 authored by George Nachman's avatar George Nachman
Browse files

Improve technical correctness of dropping files. See bug 1176 comment 4 and 5.

parent 25899072
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -3303,16 +3303,7 @@ static double EuclideanDistance(NSPoint p1, NSPoint p2) {
if (dragOperation == NSDragOperationCopy) {
NSArray *types = [pb types];
 
if ([types containsObject:NSStringPboardType]) {
aString = [pb stringForType:NSStringPboardType];
if (aString != nil) {
if ([delegate respondsToSelector:@selector(pasteString:)]) {
[delegate pasteString: aString];
res = YES;
}
}
}
if (!res && [types containsObject:NSFilenamesPboardType]) {
if ([types containsObject:NSFilenamesPboardType]) {
propertyList = [pb propertyListForType: NSFilenamesPboardType];
for (i = 0; i < (int)[propertyList count]; i++) {
// Ignore text clippings
Loading
Loading
@@ -3340,6 +3331,15 @@ static double EuclideanDistance(NSPoint p1, NSPoint p2) {
}
}
}
if (!res && [types containsObject:NSStringPboardType]) {
aString = [pb stringForType:NSStringPboardType];
if (aString != nil) {
if ([delegate respondsToSelector:@selector(pasteString:)]) {
[delegate pasteString: aString];
res = YES;
}
}
}
}
}
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment