Revision: 13401
          http://sourceforge.net/p/skim-app/code/13401
Author:   hofman
Date:     2023-03-23 10:01:27 +0000 (Thu, 23 Mar 2023)
Log Message:
-----------
no move animation with reduced motion

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

Modified: trunk/SKBookmarkController.m
===================================================================
--- trunk/SKBookmarkController.m        2023-03-22 17:12:42 UTC (rev 13400)
+++ trunk/SKBookmarkController.m        2023-03-23 10:01:27 UTC (rev 13401)
@@ -364,7 +364,12 @@
 }
 
 - (void)moveBookmarkAtIndex:(NSUInteger)fromIndex ofBookmark:(SKBookmark 
*)fromParent toIndex:(NSUInteger)toIndex ofBookmark:(SKBookmark *)toParent {
-    [outlineView moveItemAtIndex:fromIndex inParent:OV_ITEM(fromParent) 
toIndex:toIndex inParent:OV_ITEM(toParent)];
+    if ([NSView shouldShowSlideAnimation]) {
+        [outlineView moveItemAtIndex:fromIndex inParent:OV_ITEM(fromParent) 
toIndex:toIndex inParent:OV_ITEM(toParent)];
+    } else {
+        [outlineView removeItemsAtIndexes:[NSIndexSet 
indexSetWithIndex:fromIndex] inParent:OV_ITEM(fromParent) 
withAnimation:NSTableViewAnimationEffectNone];
+        [outlineView insertItemsAtIndexes:[NSIndexSet 
indexSetWithIndex:toIndex] inParent:OV_ITEM(toParent) 
withAnimation:NSTableViewAnimationEffectNone];
+    }
     SKBookmark *bookmark = [[fromParent objectInChildrenAtIndex:fromIndex] 
retain];
     [fromParent removeObjectFromChildrenAtIndex:fromIndex];
     [toParent insertObject:bookmark inChildrenAtIndex:toIndex];

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