Revision: 5565
          http://skim-app.svn.sourceforge.net/skim-app/?rev=5565&view=rev
Author:   hofman
Date:     2009-08-16 12:25:18 +0000 (Sun, 16 Aug 2009)

Log Message:
-----------
only register undo when a value actually changes

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

Modified: trunk/SKPresentationOptionsSheetController.m
===================================================================
--- trunk/SKPresentationOptionsSheetController.m        2009-08-16 12:07:45 UTC 
(rev 5564)
+++ trunk/SKPresentationOptionsSheetController.m        2009-08-16 12:25:18 UTC 
(rev 5565)
@@ -362,7 +362,8 @@
         if ([newValue isEqual:[NSNull null]]) newValue = nil;
         if ([oldValue isEqual:[NSNull null]]) oldValue = nil;
         
-        [[[self undoManager] prepareWithInvocationTarget:self] 
setValue:oldValue forKey:keyPath ofTransition:info];
+        if ((newValue || oldValue) && [newValue isEqual:oldValue] == NO)
+            [[[self undoManager] prepareWithInvocationTarget:self] 
setValue:oldValue forKey:keyPath ofTransition:info];
     } else {
         [super observeValueForKeyPath:keyPath ofObject:object change:change 
context:context];
     }


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

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to