Revision: 15574
          http://sourceforge.net/p/skim-app/code/15574
Author:   hofman
Date:     2025-06-29 17:43:18 +0000 (Sun, 29 Jun 2025)
Log Message:
-----------
remove annotations directly from page when joining

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

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2025-06-29 17:36:22 UTC (rev 15573)
+++ trunk/SKPDFView.m   2025-06-29 17:43:18 UTC (rev 15574)
@@ -4220,11 +4220,11 @@
                 [newAnnotation setBorder:[currentAnnotation border]];
             }
             if (newAnnotation) {
-                [self beginNewUndoGroupIfNeededWithCommit:YES];
                 [newAnnotation setColor:[currentAnnotation color]];
                 [newAnnotation registerUserName];
-                [self removeAnnotation:newCurrentAnnotation];
-                [self removeCurrentAnnotation:nil];
+                [self beginNewUndoGroupIfNeededWithCommit:YES];
+                [[self document] removeAnnotation:newCurrentAnnotation];
+                [[self document] removeAnnotation:currentAnnotation];
                 [[self document] addAnnotation:newAnnotation toPage:page];
                 [[self undoManager] setActionName:NSLocalizedString(@"Join 
Notes", @"Undo action name")];
                 newCurrentAnnotation = newAnnotation;
@@ -4395,8 +4395,7 @@
         
         for (PDFAnnotation *annotation in annotations) {
             if ([annotation isSkimNote] && [annotation hitTest:point] && [self 
isEditingAnnotation:annotation] == NO) {
-                [[self document] removeAnnotation:annotation];
-                [[self undoManager] setActionName:NSLocalizedString(@"Remove 
Note", @"Undo action name")];
+                [self removeAnnotation:annotation];
                 break;
             }
         }

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