Revision: 13936
          http://sourceforge.net/p/skim-app/code/13936
Author:   hofman
Date:     2023-12-19 23:43:54 +0000 (Tue, 19 Dec 2023)
Log Message:
-----------
don't bother providing drag image for unloaded dragged pages

Modified Paths:
--------------
    trunk/SKThumbnailView.m

Modified: trunk/SKThumbnailView.m
===================================================================
--- trunk/SKThumbnailView.m     2023-12-19 17:32:24 UTC (rev 13935)
+++ trunk/SKThumbnailView.m     2023-12-19 23:43:54 UTC (rev 13936)
@@ -448,9 +448,8 @@
             
             NSMutableArray *dragItems = [NSMutableArray array];
             NSDraggingItem *dragItem = [[NSDraggingItem alloc] 
initWithPasteboardWriter:item];
-            NSImage *dragImage = [self draggingImage];
             
-            [dragItem setDraggingFrame:[self draggingFrame] 
contents:dragImage];
+            [dragItem setDraggingFrame:[self draggingFrame] contents:[self 
draggingImage]];
             [dragItems addObject:dragItem];
             if (selectionIndexes) {
                 [selectionIndexes enumerateIndexesUsingBlock:^(NSUInteger idx, 
BOOL *stop){
@@ -460,15 +459,11 @@
                     NSDraggingItem *dummyDragItem = [[NSDraggingItem alloc] 
initWithPasteboardWriter:dummyItem];
                     NSRect rect;
                     SKThumbnailView *view = (SKThumbnailView 
*)[[collectionView itemAtIndexPath:[NSIndexPath indexPathForItem:idx 
inSection:0]] view];
-                    if (view) {
+                    if (view)
                         rect = [self convertRect:[view draggingFrame] 
fromView:view];
-                    } else {
-                        NSPoint offset = [self convertRect:[collectionView 
frameForItemAtIndex:idx] fromView:collectionView].origin;
+                    else
                         rect = [self draggingFrame];
-                        rect.origin.x += offset.x;
-                        rect.origin.y += offset.y;
-                    }
-                    [dummyDragItem setDraggingFrame:rect contents:[view 
draggingImage] ?: dragImage];
+                    [dummyDragItem setDraggingFrame:rect contents:[view 
draggingImage]];
                         [dragItems addObject:dummyDragItem];
                 }];
             }

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to