|
From: <ho...@us...> - 2025-07-06 09:21:50
|
Revision: 15608
http://sourceforge.net/p/skim-app/code/15608
Author: hofman
Date: 2025-07-06 09:21:48 +0000 (Sun, 06 Jul 2025)
Log Message:
-----------
don't set undo action name during undo or redo
Modified Paths:
--------------
trunk/PDFPage_SKExtensions.m
Modified: trunk/PDFPage_SKExtensions.m
===================================================================
--- trunk/PDFPage_SKExtensions.m 2025-07-04 17:06:13 UTC (rev 15607)
+++ trunk/PDFPage_SKExtensions.m 2025-07-06 09:21:48 UTC (rev 15608)
@@ -568,7 +568,8 @@
if ([self isEditable] && angle != [self rotation]) {
NSUndoManager *undoManager = [self undoManager];
[(PDFPage *)[undoManager prepareWithInvocationTarget:self] setRotationAngle:[self rotation]];
- [undoManager setActionName:NSLocalizedString(@"Rotate Page", @"Undo action name")];
+ if ([undoManager isUndoing] == NO && [undoManager isRedoing] == NO)
+ [undoManager setActionName:NSLocalizedString(@"Rotate Page", @"Undo action name")];
[undoManager setActionIsDiscardable:YES];
[self setRotation:angle];
@@ -586,7 +587,8 @@
if ([self isEditable] && inQDBoundsAsData && [inQDBoundsAsData isEqual:[NSNull null]] == NO) {
NSUndoManager *undoManager = [self undoManager];
[[undoManager prepareWithInvocationTarget:self] setBoundsAsQDRect:[self boundsAsQDRect]];
- [undoManager setActionName:NSLocalizedString(@"Crop Page", @"Undo action name")];
+ if ([undoManager isUndoing] == NO && [undoManager isRedoing] == NO)
+ [undoManager setActionName:NSLocalizedString(@"Crop Page", @"Undo action name")];
[undoManager setActionIsDiscardable:YES];
NSRect newBounds = [inQDBoundsAsData rectValueAsQDRect];
@@ -609,7 +611,8 @@
if ([self isEditable] && inQDBoundsAsData && [inQDBoundsAsData isEqual:[NSNull null]] == NO) {
NSUndoManager *undoManager = [self undoManager];
[[undoManager prepareWithInvocationTarget:self] setMediaBoundsAsQDRect:[self mediaBoundsAsQDRect]];
- [undoManager setActionName:NSLocalizedString(@"Crop Page", @"Undo action name")];
+ if ([undoManager isUndoing] == NO && [undoManager isRedoing] == NO)
+ [undoManager setActionName:NSLocalizedString(@"Crop Page", @"Undo action name")];
[undoManager setActionIsDiscardable:YES];
NSRect newBounds = [inQDBoundsAsData rectValueAsQDRect];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|