Revision: 6472
          http://skim-app.svn.sourceforge.net/skim-app/?rev=6472&view=rev
Author:   hofman
Date:     2010-04-19 12:08:51 +0000 (Mon, 19 Apr 2010)

Log Message:
-----------
copy array for undo to be implementation independent

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

Modified: trunk/SKBookmarkController.m
===================================================================
--- trunk/SKBookmarkController.m        2010-04-18 17:11:59 UTC (rev 6471)
+++ trunk/SKBookmarkController.m        2010-04-19 12:08:51 UTC (rev 6472)
@@ -507,7 +507,7 @@
                     [new removeObjectsInArray:oldValue];
                     [self stopObservingBookmarks:old];
                     [self startObservingBookmarks:new];
-                    [[[self undoManager] prepareWithInvocationTarget:self] 
setChildren:oldValue ofBookmark:bookmark];
+                    [[[self undoManager] prepareWithInvocationTarget:self] 
setChildren:[[oldValue copy] autorelease] ofBookmark:bookmark];
                 } else if ([keyPath isEqualToString:LABEL_KEY]) {
                     [[[self undoManager] prepareWithInvocationTarget:bookmark] 
setLabel:oldValue];
                 }
@@ -521,7 +521,7 @@
             case NSKeyValueChangeRemoval:
                 if ([keyPath isEqualToString:CHILDREN_KEY]) {
                     [self stopObservingBookmarks:oldValue];
-                    [[[self undoManager] prepareWithInvocationTarget:self] 
insertObjects:oldValue inChildrenOfBookmark:bookmark atIndexes:indexes];
+                    [[[self undoManager] prepareWithInvocationTarget:self] 
insertObjects:[[oldValue copy] autorelease] inChildrenOfBookmark:bookmark 
atIndexes:indexes];
                 }
                 break;
             case NSKeyValueChangeReplacement:
@@ -529,7 +529,7 @@
                     [self stopObservingBookmarks:oldValue];
                     [self startObservingBookmarks:newValue];
                     [[[self undoManager] prepareWithInvocationTarget:self] 
removeObjectsFromChildrenOfBookmark:bookmark atIndexes:indexes];
-                    [[[self undoManager] prepareWithInvocationTarget:self] 
insertObjects:oldValue inChildrenOfBookmark:bookmark atIndexes:indexes];
+                    [[[self undoManager] prepareWithInvocationTarget:self] 
insertObjects:[[oldValue copy] autorelease] inChildrenOfBookmark:bookmark 
atIndexes:indexes];
                 }
                 break;
         }


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

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to