Revision: 29141
http://sourceforge.net/p/bibdesk/svn/29141
Author: hofman
Date: 2025-04-19 16:32:39 +0000 (Sat, 19 Apr 2025)
Log Message:
-----------
revert previous commit, I had it wrong
Modified Paths:
--------------
trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m
Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m
===================================================================
--- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m 2025-04-19
16:27:41 UTC (rev 29140)
+++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m 2025-04-19
16:32:39 UTC (rev 29141)
@@ -165,9 +165,11 @@
@interface FVDropHighlightView : FVDisplayView {
NSUInteger _dropIndex;
FVDropOperation _dropOperation;
+ BOOL _dragHasURLs;
}
@property (nonatomic) NSUInteger dropIndex;
@property (nonatomic) FVDropOperation dropOperation;
+@property (nonatomic) BOOL dragHasURLs;
@end
#pragma mark -
@@ -2834,10 +2836,7 @@
// We won't reset the drop location info when we propose
NSDragOperationNone, because the delegate may want to override our decision, we
will reset it at the end
- // !!! this is quite expensive to call repeatedly in -draggingUpdated
- BOOL dragHasURLs = FVPasteboardHasURL([sender draggingPasteboard]);
-
- if (dragHasURLs == NO) {
+ if ([_dropHighlightView dragHasURLs] == NO) {
// We have to make sure the pasteboard really has a URL here, since
most NSStrings aren't valid URLs, but the delegate may accept other types
dragOp = NSDragOperationNone;
}
@@ -2868,10 +2867,6 @@
dragOp = NSDragOperationLink;
}
- if (_dropHighlightView == nil) {
- _dropHighlightView = [[FVDropHighlightView alloc]
initWithFrame:[_contentView bounds] delegate:self];
- [_contentView addSubview:_dropHighlightView];
- }
[_dropHighlightView setDropIndex:dropIndex];
[_dropHighlightView setDropOperation:dropOp];
@@ -2892,6 +2887,12 @@
// this is called as soon as the mouse is moved to start a drag, or enters the
window from outside
- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
{
+ if (_dropHighlightView == nil) {
+ _dropHighlightView = [[FVDropHighlightView alloc]
initWithFrame:[_contentView bounds] delegate:self];
+ [_contentView addSubview:_dropHighlightView];
+ }
+ // !!! this is quite expensive to call repeatedly in -draggingUpdated
+ [_dropHighlightView setDragHasURLs:FVPasteboardHasURL([sender
draggingPasteboard])];
return [self draggingUpdated:sender];
}
@@ -5112,6 +5113,7 @@
@synthesize dropIndex=_dropIndex;
@synthesize dropOperation=_dropOperation;
+@synthesize dragHasURLs=_dragHasURLs;
- (id)initWithFrame:(NSRect)frameRect {
self = [super initWithFrame:frameRect];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Bibdesk-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-commit