Revision: 15657
http://sourceforge.net/p/skim-app/code/15657
Author: hofman
Date: 2025-07-15 14:03:38 +0000 (Tue, 15 Jul 2025)
Log Message:
-----------
begin new undo group when comitting edit in progress before replacing notes
from file
Modified Paths:
--------------
trunk/SKMainWindowController.m
Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m 2025-07-14 22:41:26 UTC (rev 15656)
+++ trunk/SKMainWindowController.m 2025-07-15 14:03:38 UTC (rev 15657)
@@ -1072,9 +1072,16 @@
NSArray *notesAndPagesToAdd = [self
annotationsAndPagesWithProperties:noteDicts forDocument:[pdfView document]
autoUpdate:NO widgetProperties:widgetDicts];
if (replacing && [notes count]) {
+ NSUndoManager *undoManager = [[self document] undoManager];
+ NSInteger level = [undoManager groupingLevel];
[pdfView removePDFToolTipRects];
// remove the current annotations
[pdfView setCurrentAnnotation:nil];
+ [self commitEditing];
+ if ([undoManager groupingLevel] > level) {
+ [undoManager endUndoGrouping];
+ [undoManager beginUndoGrouping];
+ }
}
[self updateWidgetsWithProperties:widgetDicts reset:replacing];
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