Revision: 2927
          http://skim-app.svn.sourceforge.net/skim-app/?rev=2927&view=rev
Author:   hofman
Date:     2007-09-15 13:33:23 -0700 (Sat, 15 Sep 2007)

Log Message:
-----------
Don't move bookmarks when they're not displaced.

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

Modified: trunk/SKBookmarkController.m
===================================================================
--- trunk/SKBookmarkController.m        2007-09-15 16:41:19 UTC (rev 2926)
+++ trunk/SKBookmarkController.m        2007-09-15 20:33:23 UTC (rev 2927)
@@ -529,8 +529,13 @@
         SKBookmark *bookmark;
                                
                while (bookmark = [bmEnum nextObject]) {
-            if (item == [bookmark parent] && index > (int)[self 
indexOfChildBookmark:bookmark])
-                index--;
+            int bookmarkIndex = [self indexOfChildBookmark:bookmark];
+            if (item == [bookmark parent]) {
+                if (index > bookmarkIndex)
+                    index--;
+                if (index == bookmarkIndex)
+                    continue;
+            }
             [self removeChildBookmark:bookmark];
             [self bookmark:item insertChildBookmark:bookmark atIndex:index++];
                }


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

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to