Revision: 13616
http://sourceforge.net/p/skim-app/code/13616
Author: hofman
Date: 2023-08-30 16:59:24 +0000 (Wed, 30 Aug 2023)
Log Message:
-----------
check for need for undo break point when committing
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2023-08-30 16:40:08 UTC (rev 13615)
+++ trunk/SKPDFView.m 2023-08-30 16:59:24 UTC (rev 13616)
@@ -776,11 +776,8 @@
// Will need to redraw old active anotation.
if (currentAnnotation != nil) {
[self setNeedsDisplayForAnnotation:currentAnnotation];
- NSInteger level = [[self undoManager] groupingLevel];
if (editor && [self commitEditing] == NO)
[self discardEditing];
- if ([[self undoManager] groupingLevel] > level)
- pdfvFlags.wantsNewUndoGroup = YES;
}
// Assign.
@@ -3041,19 +3038,20 @@
}
- (BOOL)commitEditing {
- if (editor)
- return [editor commitEditing];
- return YES;
-}
-
-- (void)beginNewUndoGroupIfNeeded {
+ BOOL success = YES;
if (editor) {
NSUndoManager *undoManager = [self undoManager];
NSInteger level = [undoManager groupingLevel];
- [self commitEditing];
+ success = [editor commitEditing];
if ([undoManager groupingLevel] > level)
pdfvFlags.wantsNewUndoGroup = YES;
}
+ return success;
+}
+
+- (void)beginNewUndoGroupIfNeeded {
+ if (editor)
+ [self commitEditing];
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