Revision: 6557
          http://skim-app.svn.sourceforge.net/skim-app/?rev=6557&view=rev
Author:   hofman
Date:     2010-05-21 16:56:49 +0000 (Fri, 21 May 2010)

Log Message:
-----------
select moved bookmarks

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

Modified: trunk/SKBookmarkController.m
===================================================================
--- trunk/SKBookmarkController.m        2010-05-21 16:48:42 UTC (rev 6556)
+++ trunk/SKBookmarkController.m        2010-05-21 16:56:49 UTC (rev 6557)
@@ -662,6 +662,9 @@
     NSString *type = [pboard availableTypeFromArray:[NSArray 
arrayWithObjects:SKBookmarkRowsPboardType, NSFilenamesPboardType, nil]];
     
     if ([type isEqualToString:SKBookmarkRowsPboardType]) {
+        NSMutableArray *movedBookmarks = [NSMutableArray array];
+        NSMutableIndexSet *indexes = [NSMutableIndexSet indexSet];
+        
         if (item == nil) item = bookmarkRoot;
         
         [self endEditing];
@@ -676,7 +679,16 @@
             }
             [parent removeObjectFromChildrenAtIndex:bookmarkIndex];
             [(SKBookmark *)item insertObject:bookmark 
inChildrenAtIndex:anIndex++];
+            [movedBookmarks addObject:bookmark];
                }
+        for (SKBookmark *bookmark in movedBookmarks) {
+            NSInteger row = [outlineView rowForItem:bookmark];
+            if (row != -1)
+                [indexes addIndex:row];
+        }
+        if ([indexes count])
+            [outlineView selectRowIndexes:indexes byExtendingSelection:NO];
+        
         return YES;
     } else if ([type isEqualToString:NSFilenamesPboardType]) {
         NSArray *paths = [pboard propertyListForType:NSFilenamesPboardType];


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

Reply via email to