Revision: 14116
http://sourceforge.net/p/skim-app/code/14116
Author: hofman
Date: 2024-03-19 14:51:47 +0000 (Tue, 19 Mar 2024)
Log Message:
-----------
Make undo action for page rotation and bounds from AppleScript discardable
Modified Paths:
--------------
trunk/PDFPage_SKExtensions.m
Modified: trunk/PDFPage_SKExtensions.m
===================================================================
--- trunk/PDFPage_SKExtensions.m 2024-03-17 09:46:33 UTC (rev 14115)
+++ trunk/PDFPage_SKExtensions.m 2024-03-19 14:51:47 UTC (rev 14116)
@@ -563,8 +563,7 @@
NSUndoManager *undoManager = [[self containingDocument] undoManager];
[(PDFPage *)[undoManager prepareWithInvocationTarget:self]
setRotationAngle:[self rotation]];
[undoManager setActionName:NSLocalizedString(@"Rotate Page", @"Undo
action name")];
- // this will dirty the document, even though no saveable change has
been made
- // but we cannot undo the document change count because there may be
real changes to the document in the script
+ [undoManager setActionIsDiscardable:YES];
[self setRotation:angle];
@@ -582,8 +581,7 @@
NSUndoManager *undoManager = [[self containingDocument] undoManager];
[[undoManager prepareWithInvocationTarget:self]
setBoundsAsQDRect:[self boundsAsQDRect]];
[undoManager setActionName:NSLocalizedString(@"Crop Page", @"Undo
action name")];
- // this will dirty the document, even though no saveable change has
been made
- // but we cannot undo the document change count because there may be
real changes to the document in the script
+ [undoManager setActionIsDiscardable:YES];
NSRect newBounds = [inQDBoundsAsData rectValueAsQDRect];
if (NSWidth(newBounds) < 0.0)
@@ -606,8 +604,7 @@
NSUndoManager *undoManager = [[self containingDocument] undoManager];
[[undoManager prepareWithInvocationTarget:self]
setMediaBoundsAsQDRect:[self mediaBoundsAsQDRect]];
[undoManager setActionName:NSLocalizedString(@"Crop Page", @"Undo
action name")];
- // this will dirty the document, even though no saveable change has
been made
- // but we cannot undo the document change count because there may be
real changes to the document in the script
+ [undoManager setActionIsDiscardable:YES];
NSRect newBounds = [inQDBoundsAsData rectValueAsQDRect];
if (NSWidth(newBounds) < 0.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