Revision: 15583
          http://sourceforge.net/p/skim-app/code/15583
Author:   hofman
Date:     2025-07-02 09:41:48 +0000 (Wed, 02 Jul 2025)
Log Message:
-----------
simplify pasting single copied annotation

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

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2025-07-02 09:35:17 UTC (rev 15582)
+++ trunk/SKPDFView.m   2025-07-02 09:41:48 UTC (rev 15583)
@@ -1234,10 +1234,17 @@
     if (isPlainText == NO)
         newAnnotations = [pboard readObjectsForClasses:@[[PDFAnnotation 
class]] options:options];
     
-    if ([newAnnotations count] > 0) {
+    if ([newAnnotations count] == 1) {
         
         page = [self currentPage];
+        PDFAnnotation *newAnnotation = [newAnnotations firstObject];
+        [newAnnotation setBounds:SKConstrainRect([newAnnotation bounds], [page 
boundsForBox:[self displayBox]])];
+        [self addAnnotation:newAnnotation toPage:page select:YES];
         
+    } else if ([newAnnotations count] > 0) {
+        
+        page = [self currentPage];
+        
         [self commitEditing];
         [self beginNewUndoGroupIfNeeded];
         

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



_______________________________________________
Skim-app-commit mailing list
Skim-app-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to