Revision: 13609
          http://sourceforge.net/p/skim-app/code/13609
Author:   hofman
Date:     2023-08-26 16:20:59 +0000 (Sat, 26 Aug 2023)
Log Message:
-----------
make sure page rotation uses the document's undoManager

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

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2023-08-26 16:14:45 UTC (rev 13608)
+++ trunk/SKPDFView.m   2023-08-26 16:20:59 UTC (rev 13609)
@@ -2391,10 +2391,10 @@
 }
 
 - (void)rotatePageAtIndex:(NSUInteger)idx by:(NSInteger)rotation {
-    NSUndoManager *undoManager = [self undoManager];
+    NSDocument *doc = [[self delegate] 
respondsToSelector:@selector(documentForPDFView:)] ? [[self delegate] 
documentForPDFView:self] : [[[self window] windowController] document];
+    NSUndoManager *undoManager = [doc undoManager];
     [[undoManager prepareWithInvocationTarget:self] rotatePageAtIndex:idx 
by:-rotation];
     [undoManager setActionName:NSLocalizedString(@"Rotate Page", @"Undo action 
name")];
-    NSDocument *doc = [[self delegate] 
respondsToSelector:@selector(documentForPDFView:)] ? [[self delegate] 
documentForPDFView:self] : [[[self window] windowController] document];
     [doc undoableActionIsDiscardable];
     
     PDFPage *page = [[self document] pageAtIndex:idx];

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