Revision: 13939
http://sourceforge.net/p/skim-app/code/13939
Author: hofman
Date: 2023-12-20 10:41:24 +0000 (Wed, 20 Dec 2023)
Log Message:
-----------
only change dragging leader index when dragging multiple items
Modified Paths:
--------------
trunk/SKThumbnailView.m
Modified: trunk/SKThumbnailView.m
===================================================================
--- trunk/SKThumbnailView.m 2023-12-20 10:01:43 UTC (rev 13938)
+++ trunk/SKThumbnailView.m 2023-12-20 10:41:24 UTC (rev 13939)
@@ -448,7 +448,7 @@
NSMutableArray *dragItems = [NSMutableArray array];
NSDraggingItem *dragItem = [[NSDraggingItem alloc]
initWithPasteboardWriter:item];
- __block BOOL hasFirstItem = YES;
+ __block BOOL selectLeaderIndex = NO;
[dragItem setDraggingFrame:[self draggingFrame] contents:[self
draggingImage]];
if (selectionIndexes == nil) {
@@ -466,10 +466,10 @@
SKThumbnailView *view = (SKThumbnailView
*)[[collectionView itemAtIndexPath:[NSIndexPath indexPathForItem:idx
inSection:0]] view];
if (view) {
rect = [self convertRect:[view draggingFrame]
fromView:view];
+ if (idx == firstIndex)
+ selectLeaderIndex = YES;
} else {
rect = [self draggingFrame];
- if (idx == firstIndex)
- hasFirstItem = NO;
}
[dummyDragItem setDraggingFrame:rect contents:[view
draggingImage]];
[dragItems addObject:dummyDragItem];
@@ -479,7 +479,7 @@
NSDraggingSession *session = [self
beginDraggingSessionWithItems:dragItems event:theEvent source:self];
[session setDraggingFormation:NSDraggingFormationStack];
- if (hasFirstItem)
+ if (selectLeaderIndex)
[session setDraggingLeaderIndex:0];
}
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