Revision: 15606
          http://sourceforge.net/p/skim-app/code/15606
Author:   hofman
Date:     2025-07-04 16:41:53 +0000 (Fri, 04 Jul 2025)
Log Message:
-----------
don't use local variable

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

Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m      2025-07-04 16:25:53 UTC (rev 15605)
+++ trunk/SKMainWindowController.m      2025-07-04 16:41:53 UTC (rev 15606)
@@ -2736,7 +2736,6 @@
             
             // Is this the first observed note change in the current undo 
group?
             NSUndoManager *undoManager = [[self document] undoManager];
-            BOOL isUndoOrRedo = ([undoManager isUndoing] || [undoManager 
isRedoing]);
             
             if ([undoManager isUndoRegistrationEnabled] == NO)
                 return;
@@ -2747,7 +2746,7 @@
                 // Register an undo operation for any note property changes 
that are going to be coalesced between now and the next invocation of 
-observeUndoManagerCheckpoint:.
                 [undoManager registerUndoWithTarget:self 
selector:@selector(setNoteProperties:) object:undoGroupOldPropertiesPerNote];
                 // Don't set the undo action name during undoing and redoing
-                if (isUndoOrRedo == NO)
+                if ([undoManager isUndoing] == NO && [undoManager isRedoing] 
== NO)
                     [undoManager setActionName:NSLocalizedString(@"Edit Note", 
@"Undo action name")];
             }
 
@@ -2758,7 +2757,7 @@
                 oldNoteProperties = [[NSMutableDictionary alloc] init];
                 [undoGroupOldPropertiesPerNote setObject:oldNoteProperties 
forKey:note];
                 // set the mod date here, need to do that only once for each 
note for a real user action
-                if ([[NSUserDefaults standardUserDefaults] 
boolForKey:SKDisableModificationDateKey] == NO && isUndoOrRedo == NO && 
[keyPath isEqualToString:SKNPDFAnnotationModificationDateKey] == NO && [note 
isSkimNote])
+                if ([[NSUserDefaults standardUserDefaults] 
boolForKey:SKDisableModificationDateKey] == NO && [undoManager isUndoing] == NO 
&& [undoManager isRedoing] == NO && [keyPath 
isEqualToString:SKNPDFAnnotationModificationDateKey] == NO && [note isSkimNote])
                     [note setModificationDate:[NSDate date]];
             }
             

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
Skim-app-commit mailing list
Skim-app-commit@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to