Revision: 14448
          http://sourceforge.net/p/skim-app/code/14448
Author:   hofman
Date:     2024-09-01 22:26:53 +0000 (Sun, 01 Sep 2024)
Log Message:
-----------
Make selection rect align with integer points on page, we only use its result 
this way

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

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2024-09-01 21:50:02 UTC (rev 14447)
+++ trunk/SKPDFView.m   2024-09-01 22:26:53 UTC (rev 14448)
@@ -4637,6 +4637,8 @@
     
     SKRectEdges resizeHandle = didSelect ? 
SKResizeHandleForPointFromRect(initialPoint, selectionRect, margin) : 0;
     
+    initialPoint = SKIntegralPoint(initialPoint);
+    
     if (resizeHandle == 0 && (didSelect == NO || NSPointInRect(initialPoint, 
selectionRect) == NO)) {
         selectionRect.origin = initialPoint;
         selectionRect.size = NSZeroSize;
@@ -4662,7 +4664,7 @@
         NSRect newRect = initialRect;
         NSPoint delta;
         
-        newPoint = [self convertPoint:[theEvent locationInView:self] 
toPage:page];
+        newPoint = SKIntegralPoint([self convertPoint:[theEvent 
locationInView:self] toPage:page]);
         delta = SKSubstractPoints(newPoint, initialPoint);
         
         if (resizeHandle) {

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