Revision: 13916
          http://sourceforge.net/p/skim-app/code/13916
Author:   hofman
Date:     2023-12-18 17:28:50 +0000 (Mon, 18 Dec 2023)
Log Message:
-----------
index rather than point to keep track of stack position

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

Modified: trunk/SKThumbnailView.m
===================================================================
--- trunk/SKThumbnailView.m     2023-12-18 17:07:32 UTC (rev 13915)
+++ trunk/SKThumbnailView.m     2023-12-18 17:28:50 UTC (rev 13916)
@@ -452,17 +452,15 @@
                 NSCollectionView *collectionView = [[self controller] 
collectionView];
                 [dragItem setImageComponentsProvider:^{
                     NSMutableArray *components = [NSMutableArray array];
-                    NSInteger frontCount = [selectionIndexes 
countOfIndexesInRange:NSMakeRange(0, pageIndex)];
-                    __block NSPoint offset = NSMakePoint(-frontCount * 
COMPONENT_OFFSET_X, -frontCount * COMPONENT_OFFSET_Y);
+                    __block NSInteger offset = -(NSInteger)[selectionIndexes 
countOfIndexesInRange:NSMakeRange(0, pageIndex)];
                     [selectionIndexes enumerateIndexesUsingBlock:^(NSUInteger 
idx, BOOL *stop){
                         NSDraggingImageComponent *component = 
[(SKThumbnailView *)[[collectionView itemAtIndexPath:[NSIndexPath 
indexPathForItem:idx inSection:0]] view] draggingImageComponent];
                         NSRect rect = [component frame];
-                        rect.origin.x += offset.x;
-                        rect.origin.y += offset.y;
+                        rect.origin.x += offset * COMPONENT_OFFSET_X;
+                        rect.origin.y += offset * COMPONENT_OFFSET_Y;
                         [component setFrame:rect];
                         [components insertObject:component atIndex:0];
-                        offset.x += COMPONENT_OFFSET_X;
-                        offset.y += COMPONENT_OFFSET_Y;
+                        ++offset;
                     }];
                     return components;
                 }];

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