Revision: 16382
          http://sourceforge.net/p/skim-app/code/16382
Author:   hofman
Date:     2026-06-10 14:26:56 +0000 (Wed, 10 Jun 2026)
Log Message:
-----------
commit edited text note before moving to an undisplayed page

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

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2026-06-09 16:08:53 UTC (rev 16381)
+++ trunk/SKPDFView.m   2026-06-10 14:26:56 UTC (rev 16382)
@@ -3113,9 +3113,15 @@
 }
 
 - (void)handleWillMoveAnnotationNotification:(NSNotification *)notification {
-    PDFAnnotation *annotation = [[notification userInfo] 
objectForKey:SKPDFDocumentAnnotationKey];
+    NSDictionary *userInfo = [notification userInfo];
+    PDFAnnotation *annotation = [userInfo 
objectForKey:SKPDFDocumentAnnotationKey];
     
-    [self updatedAnnotation:annotation];
+    if ([self isEditingAnnotation:annotation] && [self 
isPageAtIndexDisplayed:[[userInfo objectForKey:SKPDFDocumentPageKey] 
pageIndex]] == NO) {
+        [self commitEditing];
+        [self beginNewUndoGroupIfNeeded];
+    } else {
+        [self updatedAnnotation:annotation];
+    }
 }
 
 - (void)handleDidMoveAnnotationNotification:(NSNotification *)notification {

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