Revision: 13615
          http://sourceforge.net/p/skim-app/code/13615
Author:   hofman
Date:     2023-08-30 16:40:08 +0000 (Wed, 30 Aug 2023)
Log Message:
-----------
make sure text note ends editing before adding undo break point when 
adding/removing/dragging a note

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

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2023-08-26 22:40:42 UTC (rev 13614)
+++ trunk/SKPDFView.m   2023-08-30 16:40:08 UTC (rev 13615)
@@ -3047,6 +3047,13 @@
 }
 
 - (void)beginNewUndoGroupIfNeeded {
+    if (editor) {
+        NSUndoManager *undoManager = [self undoManager];
+        NSInteger level = [undoManager groupingLevel];
+        [self commitEditing];
+        if ([undoManager groupingLevel] > level)
+            pdfvFlags.wantsNewUndoGroup = YES;
+    }
     if (pdfvFlags.wantsNewUndoGroup) {
         NSUndoManager *undoManger = [self undoManager];
         if ([undoManger groupingLevel] > 0) {

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