Revision: 26307 http://sourceforge.net/p/bibdesk/svn/26307 Author: hofman Date: 2021-06-26 17:50:26 +0000 (Sat, 26 Jun 2021) Log Message: ----------- Don't animate undo and applescript of insertion or removal of bookmarks, as we cannot group them, and adding the actions without grouping gives insconsistent rows
Modified Paths: -------------- trunk/bibdesk/BDSKBookmark+Scripting.m trunk/bibdesk/BDSKBookmarkController.h trunk/bibdesk/BDSKBookmarkController.m trunk/bibdesk/BDSKSearchBookmark+Scripting.m trunk/bibdesk/BDSKSearchBookmarkController.h trunk/bibdesk/BDSKSearchBookmarkController.m trunk/bibdesk/BibDocument_Groups.m Modified: trunk/bibdesk/BDSKBookmark+Scripting.m =================================================================== --- trunk/bibdesk/BDSKBookmark+Scripting.m 2021-06-26 17:14:47 UTC (rev 26306) +++ trunk/bibdesk/BDSKBookmark+Scripting.m 2021-06-26 17:50:26 UTC (rev 26307) @@ -89,11 +89,11 @@ - (void)insertObject:(BDSKBookmark *)bookmark inBookmarksAtIndex:(NSUInteger)anIndex { if ([bookmark parent] == nil) - [[BDSKBookmarkController sharedBookmarkController] insertBookmarks:[NSArray arrayWithObjects:bookmark, nil] atIndexes:[NSIndexSet indexSetWithIndex:anIndex] ofBookmark:self partial:NO]; + [[BDSKBookmarkController sharedBookmarkController] insertBookmarks:[NSArray arrayWithObjects:bookmark, nil] atIndexes:[NSIndexSet indexSetWithIndex:anIndex] ofBookmark:self partial:NO animate:NO]; } - (void)removeObjectFromBookmarksAtIndex:(NSUInteger)anIndex { - [[BDSKBookmarkController sharedBookmarkController] removeBookmarksAtIndexes:[NSIndexSet indexSetWithIndex:anIndex] ofBookmark:self partial:NO]; + [[BDSKBookmarkController sharedBookmarkController] removeBookmarksAtIndexes:[NSIndexSet indexSetWithIndex:anIndex] ofBookmark:self partial:NO animate:NO]; } - (id)newScriptingObjectOfClass:(Class)objectClass forValueForKey:(NSString *)key withContentsValue:(id)contentsValue properties:(NSDictionary *)properties { Modified: trunk/bibdesk/BDSKBookmarkController.h =================================================================== --- trunk/bibdesk/BDSKBookmarkController.h 2021-06-26 17:14:47 UTC (rev 26306) +++ trunk/bibdesk/BDSKBookmarkController.h 2021-06-26 17:50:26 UTC (rev 26307) @@ -69,9 +69,9 @@ @property (nonatomic, readonly) BDSKBookmark *bookmarkRoot; -- (void)insertBookmarks:(NSArray *)newBookmarks atIndexes:(NSIndexSet *)indexes ofBookmark:(BDSKBookmark *)parent partial:(BOOL)isPartial; -- (void)removeBookmarksAtIndexes:(NSIndexSet *)indexes ofBookmark:(BDSKBookmark *)parent partial:(BOOL)isPartial; -- (void)replaceBookmarksAtIndexes:(NSIndexSet *)indexes withBookmarks:(NSArray *)newBookmarks ofBookmark:(BDSKBookmark *)parent partial:(BOOL)isPartial; +- (void)insertBookmarks:(NSArray *)newBookmarks atIndexes:(NSIndexSet *)indexes ofBookmark:(BDSKBookmark *)parent partial:(BOOL)isPartial animate:(BOOL)animate; +- (void)removeBookmarksAtIndexes:(NSIndexSet *)indexes ofBookmark:(BDSKBookmark *)parent partial:(BOOL)isPartial animate:(BOOL)animate; +- (void)replaceBookmarksAtIndexes:(NSIndexSet *)indexes withBookmarks:(NSArray *)newBookmarks ofBookmark:(BDSKBookmark *)parent partial:(BOOL)isPartial animate:(BOOL)animate; - (void)addBookmarkWithURL:(NSURL *)aURL proposedName:(NSString *)name modalForWindow:(NSWindow *)window; Modified: trunk/bibdesk/BDSKBookmarkController.m =================================================================== --- trunk/bibdesk/BDSKBookmarkController.m 2021-06-26 17:14:47 UTC (rev 26306) +++ trunk/bibdesk/BDSKBookmarkController.m 2021-06-26 17:50:26 UTC (rev 26307) @@ -177,7 +177,7 @@ BDSKBookmark *bookmark = [BDSKBookmark bookmarkWithURL:aURL name:[bookmarkSheetController stringValue]]; if (bookmark) { BDSKBookmark *folder = [bookmarkSheetController selectedFolder] ?: bookmarkRoot; - [self insertBookmarks:[NSArray arrayWithObjects:bookmark, nil] atIndexes:[NSIndexSet indexSetWithIndex:[folder countOfChildren]] ofBookmark:folder partial:NO]; + [self insertBookmarks:[NSArray arrayWithObjects:bookmark, nil] atIndexes:[NSIndexSet indexSetWithIndex:[folder countOfChildren]] ofBookmark:folder partial:NO animate:YES]; } } }]; @@ -185,9 +185,9 @@ #define OV_ITEM(parent) (parent == bookmarkRoot ? nil : parent) -- (void)insertBookmarks:(NSArray *)newBookmarks atIndexes:(NSIndexSet *)indexes ofBookmark:(BDSKBookmark *)parent partial:(BOOL)isPartial { +- (void)insertBookmarks:(NSArray *)newBookmarks atIndexes:(NSIndexSet *)indexes ofBookmark:(BDSKBookmark *)parent partial:(BOOL)isPartial animate:(BOOL)animate { NSTableViewAnimationOptions options = NSTableViewAnimationEffectGap | NSTableViewAnimationSlideDown; - if ([self isWindowLoaded] == NO || [[self window] isVisible] == NO || [NSAnimationContext defaultAnimationTimeInterval] <= 0.0) + if (animate == NO || [self isWindowLoaded] == NO || [[self window] isVisible] == NO || [NSAnimationContext defaultAnimationTimeInterval] <= 0.0) options = NSTableViewAnimationEffectNone; if (isPartial == NO) [outlineView beginUpdates]; @@ -197,9 +197,9 @@ [outlineView endUpdates]; } -- (void)removeBookmarksAtIndexes:(NSIndexSet *)indexes ofBookmark:(BDSKBookmark *)parent partial:(BOOL)isPartial { +- (void)removeBookmarksAtIndexes:(NSIndexSet *)indexes ofBookmark:(BDSKBookmark *)parent partial:(BOOL)isPartial animate:(BOOL)animate { NSTableViewAnimationOptions options = NSTableViewAnimationEffectGap | NSTableViewAnimationSlideUp; - if ([self isWindowLoaded] == NO || [[self window] isVisible] == NO || [NSAnimationContext defaultAnimationTimeInterval] <= 0.0) + if (animate == NO || [self isWindowLoaded] == NO || [[self window] isVisible] == NO || [NSAnimationContext defaultAnimationTimeInterval] <= 0.0) options = NSTableViewAnimationEffectNone; if (isPartial == NO) [outlineView beginUpdates]; @@ -209,9 +209,9 @@ [outlineView endUpdates]; } -- (void)replaceBookmarksAtIndexes:(NSIndexSet *)indexes withBookmarks:(NSArray *)newBookmarks ofBookmark:(BDSKBookmark *)parent partial:(BOOL)isPartial { +- (void)replaceBookmarksAtIndexes:(NSIndexSet *)indexes withBookmarks:(NSArray *)newBookmarks ofBookmark:(BDSKBookmark *)parent partial:(BOOL)isPartial animate:(BOOL)animate { NSTableViewAnimationOptions options = NSTableViewAnimationEffectGap | NSTableViewAnimationSlideUp; - if ([self isWindowLoaded] == NO || [[self window] isVisible] == NO || [NSAnimationContext defaultAnimationTimeInterval] <= 0.0) + if (animate == NO || [self isWindowLoaded] == NO || [[self window] isVisible] == NO || [NSAnimationContext defaultAnimationTimeInterval] <= 0.0) options = NSTableViewAnimationEffectNone; if (isPartial == NO) [outlineView beginUpdates]; @@ -224,16 +224,12 @@ [outlineView endUpdates]; } -- (void)moveBookmarkAtIndex:(NSUInteger)fromIndex ofBookmark:(BDSKBookmark *)fromParent toIndex:(NSUInteger)toIndex ofBookmark:(BDSKBookmark *)toParent partial:(BOOL)isPartial { - if (isPartial == NO) - [outlineView beginUpdates]; +- (void)moveBookmarkAtIndex:(NSUInteger)fromIndex ofBookmark:(BDSKBookmark *)fromParent toIndex:(NSUInteger)toIndex ofBookmark:(BDSKBookmark *)toParent { [outlineView moveItemAtIndex:fromIndex inParent:OV_ITEM(fromParent) toIndex:toIndex inParent:OV_ITEM(toParent)]; BDSKBookmark *bookmark = [[fromParent objectInChildrenAtIndex:fromIndex] retain]; [fromParent removeObjectFromChildrenAtIndex:fromIndex]; [toParent insertObject:bookmark inChildrenAtIndex:toIndex]; [bookmark release]; - if (isPartial == NO) - [outlineView endUpdates]; } - (void)getInsertionFolder:(BDSKBookmark **)bookmarkPtr childIndex:(NSUInteger *)indexPtr { @@ -269,7 +265,7 @@ NSUInteger idx = 0; [self getInsertionFolder:&item childIndex:&idx]; - [self insertBookmarks:[NSArray arrayWithObjects:bookmark, nil] atIndexes:[NSIndexSet indexSetWithIndex:idx] ofBookmark:item partial:NO]; + [self insertBookmarks:[NSArray arrayWithObjects:bookmark, nil] atIndexes:[NSIndexSet indexSetWithIndex:idx] ofBookmark:item partial:NO animate:YES]; CGFloat delay = [NSAnimationContext defaultAnimationTimeInterval] > 0.0 ? 0.25 : 0.0; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delay * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ @@ -285,7 +281,7 @@ NSUInteger idx = 0; [self getInsertionFolder:&item childIndex:&idx]; - [self insertBookmarks:[NSArray arrayWithObjects:folder, nil] atIndexes:[NSIndexSet indexSetWithIndex:idx] ofBookmark:item partial:NO]; + [self insertBookmarks:[NSArray arrayWithObjects:folder, nil] atIndexes:[NSIndexSet indexSetWithIndex:idx] ofBookmark:item partial:NO animate:YES]; CGFloat delay = [NSAnimationContext defaultAnimationTimeInterval] > 0.0 ? 0.25 : 0.0; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delay * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ @@ -301,7 +297,7 @@ NSUInteger idx = 0; [self getInsertionFolder:&item childIndex:&idx]; - [self insertBookmarks:[NSArray arrayWithObjects:separator, nil] atIndexes:[NSIndexSet indexSetWithIndex:idx] ofBookmark:item partial:NO]; + [self insertBookmarks:[NSArray arrayWithObjects:separator, nil] atIndexes:[NSIndexSet indexSetWithIndex:idx] ofBookmark:item partial:NO animate:YES]; NSInteger row = [outlineView rowForItem:separator]; [outlineView selectRowIndexes:[NSIndexSet indexSetWithIndex:row] byExtendingSelection:NO]; @@ -388,10 +384,10 @@ [outlineView beginUpdates]; NSIndexSet *removeIndexes = indexes ?: [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, [bookmark countOfChildren])]; if ([removeIndexes count] > 0) - [self removeBookmarksAtIndexes:removeIndexes ofBookmark:bookmark partial:YES]; + [self removeBookmarksAtIndexes:removeIndexes ofBookmark:bookmark partial:YES animate:NO]; NSIndexSet *insertIndexes = indexes ?: [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, [newChildren count])]; if ([insertIndexes count] > 0) - [self insertBookmarks:newChildren atIndexes:insertIndexes ofBookmark:bookmark partial:YES]; + [self insertBookmarks:newChildren atIndexes:insertIndexes ofBookmark:bookmark partial:YES animate:NO]; [outlineView endUpdates]; } @@ -426,13 +422,13 @@ case NSKeyValueChangeInsertion: if ([keyPath isEqualToString:CHILDREN_KEY]) { [self startObservingBookmarks:newValue]; - [[[self undoManager] prepareWithInvocationTarget:self] removeBookmarksAtIndexes:indexes ofBookmark:bookmark partial:NO]; + [[[self undoManager] prepareWithInvocationTarget:self] removeBookmarksAtIndexes:indexes ofBookmark:bookmark partial:NO animate:YES]; } break; case NSKeyValueChangeRemoval: if ([keyPath isEqualToString:CHILDREN_KEY]) { [self stopObservingBookmarks:oldValue]; - [[[self undoManager] prepareWithInvocationTarget:self] insertBookmarks:[[oldValue copy] autorelease] atIndexes:indexes ofBookmark:bookmark partial:NO]; + [[[self undoManager] prepareWithInvocationTarget:self] insertBookmarks:[[oldValue copy] autorelease] atIndexes:indexes ofBookmark:bookmark partial:NO animate:NO]; } break; case NSKeyValueChangeReplacement: @@ -560,7 +556,7 @@ if (idx == bookmarkIndex) continue; } - [self moveBookmarkAtIndex:bookmarkIndex ofBookmark:parent toIndex:idx ofBookmark:item partial:YES]; + [self moveBookmarkAtIndex:bookmarkIndex ofBookmark:parent toIndex:idx ofBookmark:item]; [movedBookmarks addObject:bookmark]; } [ov endUpdates]; @@ -601,7 +597,7 @@ } [self endEditing]; NSMutableIndexSet *indexes = [NSMutableIndexSet indexSetWithIndexesInRange:NSMakeRange(idx, [newBookmarks count])]; - [self insertBookmarks:newBookmarks atIndexes:indexes ofBookmark:item partial:NO]; + [self insertBookmarks:newBookmarks atIndexes:indexes ofBookmark:item partial:NO animate:YES]; if (item == bookmarkRoot || [outlineView isItemExpanded:item]) { if (item == bookmarkRoot) [indexes shiftIndexesStartingAtIndex:0 by:[outlineView rowForItem:item] + 1]; @@ -655,7 +651,7 @@ if (itemIndex != NSNotFound) { if (itemParent != parent) { if (parent && [indexes count]) - [self removeBookmarksAtIndexes:indexes ofBookmark:parent partial:YES]; + [self removeBookmarksAtIndexes:indexes ofBookmark:parent partial:YES animate:YES]; parent = itemParent; [indexes removeAllIndexes]; } @@ -663,7 +659,7 @@ } } if (parent && [indexes count]) - [self removeBookmarksAtIndexes:indexes ofBookmark:parent partial:YES]; + [self removeBookmarksAtIndexes:indexes ofBookmark:parent partial:YES animate:YES]; [ov endUpdates]; } Modified: trunk/bibdesk/BDSKSearchBookmark+Scripting.m =================================================================== --- trunk/bibdesk/BDSKSearchBookmark+Scripting.m 2021-06-26 17:14:47 UTC (rev 26306) +++ trunk/bibdesk/BDSKSearchBookmark+Scripting.m 2021-06-26 17:50:26 UTC (rev 26307) @@ -91,11 +91,11 @@ - (void)insertObject:(BDSKSearchBookmark *)bookmark inSearchBookmarksAtIndex:(NSUInteger)anIndex { if ([bookmark parent] == nil) - [[BDSKSearchBookmarkController sharedBookmarkController] insertBookmarks:[NSArray arrayWithObjects:bookmark, nil] atIndexes:[NSIndexSet indexSetWithIndex:anIndex] ofBookmark:self partial:NO]; + [[BDSKSearchBookmarkController sharedBookmarkController] insertBookmarks:[NSArray arrayWithObjects:bookmark, nil] atIndexes:[NSIndexSet indexSetWithIndex:anIndex] ofBookmark:self partial:NO animate:NO]; } - (void)removeObjectFromSearchBookmarksAtIndex:(NSUInteger)anIndex { - [[BDSKSearchBookmarkController sharedBookmarkController] removeBookmarksAtIndexes:[NSIndexSet indexSetWithIndex:anIndex] ofBookmark:self partial:NO]; + [[BDSKSearchBookmarkController sharedBookmarkController] removeBookmarksAtIndexes:[NSIndexSet indexSetWithIndex:anIndex] ofBookmark:self partial:NO animate:NO]; } - (id)newScriptingObjectOfClass:(Class)objectClass forValueForKey:(NSString *)key withContentsValue:(id)contentsValue properties:(NSDictionary *)properties { Modified: trunk/bibdesk/BDSKSearchBookmarkController.h =================================================================== --- trunk/bibdesk/BDSKSearchBookmarkController.h 2021-06-26 17:14:47 UTC (rev 26306) +++ trunk/bibdesk/BDSKSearchBookmarkController.h 2021-06-26 17:50:26 UTC (rev 26307) @@ -68,9 +68,9 @@ @property (nonatomic, readonly) BDSKSearchBookmark *bookmarkRoot; -- (void)insertBookmarks:(NSArray *)newBookmarks atIndexes:(NSIndexSet *)indexes ofBookmark:(BDSKSearchBookmark *)parent partial:(BOOL)isPartial; -- (void)removeBookmarksAtIndexes:(NSIndexSet *)indexes ofBookmark:(BDSKSearchBookmark *)parent partial:(BOOL)isPartial; -- (void)replaceBookmarksAtIndexes:(NSIndexSet *)indexes withBookmarks:(NSArray *)newBookmarks ofBookmark:(BDSKSearchBookmark *)parent partial:(BOOL)isPartial; +- (void)insertBookmarks:(NSArray *)newBookmarks atIndexes:(NSIndexSet *)indexes ofBookmark:(BDSKSearchBookmark *)parent partial:(BOOL)isPartial animate:(BOOL)animate; +- (void)removeBookmarksAtIndexes:(NSIndexSet *)indexes ofBookmark:(BDSKSearchBookmark *)parent partial:(BOOL)isPartial animate:(BOOL)animate; +- (void)replaceBookmarksAtIndexes:(NSIndexSet *)indexes withBookmarks:(NSArray *)newBookmarks ofBookmark:(BDSKSearchBookmark *)parent partial:(BOOL)isPartial animate:(BOOL)animate; - (IBAction)insertBookmarkFolder:(id)sender; - (IBAction)insertBookmarkSeparator:(id)sender; Modified: trunk/bibdesk/BDSKSearchBookmarkController.m =================================================================== --- trunk/bibdesk/BDSKSearchBookmarkController.m 2021-06-26 17:14:47 UTC (rev 26306) +++ trunk/bibdesk/BDSKSearchBookmarkController.m 2021-06-26 17:50:26 UTC (rev 26307) @@ -150,9 +150,9 @@ #define OV_ITEM(parent) (parent == bookmarkRoot ? nil : parent) -- (void)insertBookmarks:(NSArray *)newBookmarks atIndexes:(NSIndexSet *)indexes ofBookmark:(BDSKSearchBookmark *)parent partial:(BOOL)isPartial { +- (void)insertBookmarks:(NSArray *)newBookmarks atIndexes:(NSIndexSet *)indexes ofBookmark:(BDSKSearchBookmark *)parent partial:(BOOL)isPartial animate:(BOOL)animate { NSTableViewAnimationOptions options = NSTableViewAnimationEffectGap | NSTableViewAnimationSlideDown; - if ([self isWindowLoaded] == NO || [[self window] isVisible] == NO || [NSAnimationContext defaultAnimationTimeInterval] <= 0.0) + if (animate == NO || [self isWindowLoaded] == NO || [[self window] isVisible] == NO || [NSAnimationContext defaultAnimationTimeInterval] <= 0.0) options = NSTableViewAnimationEffectNone; if (isPartial == NO) [outlineView beginUpdates]; @@ -162,9 +162,9 @@ [outlineView endUpdates]; } -- (void)removeBookmarksAtIndexes:(NSIndexSet *)indexes ofBookmark:(BDSKSearchBookmark *)parent partial:(BOOL)isPartial { +- (void)removeBookmarksAtIndexes:(NSIndexSet *)indexes ofBookmark:(BDSKSearchBookmark *)parent partial:(BOOL)isPartial animate:(BOOL)animate { NSTableViewAnimationOptions options = NSTableViewAnimationEffectGap | NSTableViewAnimationSlideUp; - if ([self isWindowLoaded] == NO || [[self window] isVisible] == NO || [NSAnimationContext defaultAnimationTimeInterval] <= 0.0) + if (animate == NO || [self isWindowLoaded] == NO || [[self window] isVisible] == NO || [NSAnimationContext defaultAnimationTimeInterval] <= 0.0) options = NSTableViewAnimationEffectNone; if (isPartial == NO) [outlineView beginUpdates]; @@ -174,9 +174,9 @@ [outlineView endUpdates]; } -- (void)replaceBookmarksAtIndexes:(NSIndexSet *)indexes withBookmarks:(NSArray *)newBookmarks ofBookmark:(BDSKSearchBookmark *)parent partial:(BOOL)isPartial { +- (void)replaceBookmarksAtIndexes:(NSIndexSet *)indexes withBookmarks:(NSArray *)newBookmarks ofBookmark:(BDSKSearchBookmark *)parent partial:(BOOL)isPartial animate:(BOOL)animate { NSTableViewAnimationOptions options = NSTableViewAnimationEffectGap | NSTableViewAnimationSlideUp; - if ([self isWindowLoaded] == NO || [[self window] isVisible] == NO || [NSAnimationContext defaultAnimationTimeInterval] <= 0.0) + if (animate == NO || [self isWindowLoaded] == NO || [[self window] isVisible] == NO || [NSAnimationContext defaultAnimationTimeInterval] <= 0.0) options = NSTableViewAnimationEffectNone; if (isPartial == NO) [outlineView beginUpdates]; @@ -189,16 +189,12 @@ [outlineView endUpdates]; } -- (void)moveBookmarkAtIndex:(NSUInteger)fromIndex ofBookmark:(BDSKSearchBookmark *)fromParent toIndex:(NSUInteger)toIndex ofBookmark:(BDSKSearchBookmark *)toParent partial:(BOOL)isPartial { - if (isPartial == NO) - [outlineView beginUpdates]; +- (void)moveBookmarkAtIndex:(NSUInteger)fromIndex ofBookmark:(BDSKSearchBookmark *)fromParent toIndex:(NSUInteger)toIndex ofBookmark:(BDSKSearchBookmark *)toParent { [outlineView moveItemAtIndex:fromIndex inParent:OV_ITEM(fromParent) toIndex:toIndex inParent:OV_ITEM(toParent)]; BDSKSearchBookmark *bookmark = [[fromParent objectInChildrenAtIndex:fromIndex] retain]; [fromParent removeObjectFromChildrenAtIndex:fromIndex]; [toParent insertObject:bookmark inChildrenAtIndex:toIndex]; [bookmark release]; - if (isPartial == NO) - [outlineView endUpdates]; } - (void)getInsertionFolder:(BDSKSearchBookmark **)bookmarkPtr childIndex:(NSUInteger *)indexPtr { @@ -235,7 +231,7 @@ NSUInteger idx = 0; [self getInsertionFolder:&item childIndex:&idx]; - [self insertBookmarks:[NSArray arrayWithObjects:folder, nil] atIndexes:[NSIndexSet indexSetWithIndex:idx] ofBookmark:item partial:NO]; + [self insertBookmarks:[NSArray arrayWithObjects:folder, nil] atIndexes:[NSIndexSet indexSetWithIndex:idx] ofBookmark:item partial:NO animate:YES]; CGFloat delay = [NSAnimationContext defaultAnimationTimeInterval] > 0.0 ? 0.25 : 0.0; dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delay * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ @@ -251,7 +247,7 @@ NSUInteger idx = 0; [self getInsertionFolder:&item childIndex:&idx]; - [self insertBookmarks:[NSArray arrayWithObjects:separator, nil] atIndexes:[NSIndexSet indexSetWithIndex:idx] ofBookmark:item partial:NO]; + [self insertBookmarks:[NSArray arrayWithObjects:separator, nil] atIndexes:[NSIndexSet indexSetWithIndex:idx] ofBookmark:item partial:NO animate:YES]; NSInteger row = [outlineView rowForItem:separator]; [outlineView selectRowIndexes:[NSIndexSet indexSetWithIndex:row] byExtendingSelection:NO]; @@ -340,10 +336,10 @@ [outlineView beginUpdates]; NSIndexSet *removeIndexes = indexes ?: [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, [bookmark countOfChildren])]; if ([removeIndexes count] > 0) - [self removeBookmarksAtIndexes:removeIndexes ofBookmark:bookmark partial:YES]; + [self removeBookmarksAtIndexes:removeIndexes ofBookmark:bookmark partial:YES animate:NO]; NSIndexSet *insertIndexes = indexes ?: [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, [newChildren count])]; if ([insertIndexes count] > 0) - [self insertBookmarks:newChildren atIndexes:insertIndexes ofBookmark:bookmark partial:YES]; + [self insertBookmarks:newChildren atIndexes:insertIndexes ofBookmark:bookmark partial:YES animate:NO]; [outlineView endUpdates]; } @@ -380,13 +376,13 @@ case NSKeyValueChangeInsertion: if ([keyPath isEqualToString:CHILDREN_KEY]) { [self startObservingBookmarks:newValue]; - [[[self undoManager] prepareWithInvocationTarget:self] removeBookmarksAtIndexes:indexes ofBookmark:bookmark partial:NO]; + [[[self undoManager] prepareWithInvocationTarget:self] removeBookmarksAtIndexes:indexes ofBookmark:bookmark partial:NO animate:NO]; } break; case NSKeyValueChangeRemoval: if ([keyPath isEqualToString:CHILDREN_KEY]) { [self stopObservingBookmarks:oldValue]; - [[[self undoManager] prepareWithInvocationTarget:self] insertBookmarks:[[oldValue copy] autorelease] atIndexes:indexes ofBookmark:bookmark partial:NO]; + [[[self undoManager] prepareWithInvocationTarget:self] insertBookmarks:[[oldValue copy] autorelease] atIndexes:indexes ofBookmark:bookmark partial:NO animate:NO]; } break; case NSKeyValueChangeReplacement: @@ -515,7 +511,7 @@ if (idx == bookmarkIndex) continue; } - [self moveBookmarkAtIndex:bookmarkIndex ofBookmark:parent toIndex:idx ofBookmark:item partial:YES]; + [self moveBookmarkAtIndex:bookmarkIndex ofBookmark:parent toIndex:idx ofBookmark:item]; [movedBookmarks addObject:bookmark]; } [ov endUpdates]; @@ -557,7 +553,7 @@ } [self endEditing]; NSMutableIndexSet *indexes = [NSMutableIndexSet indexSetWithIndexesInRange:NSMakeRange(idx, [newBookmarks count])]; - [self insertBookmarks:newBookmarks atIndexes:indexes ofBookmark:item partial:NO]; + [self insertBookmarks:newBookmarks atIndexes:indexes ofBookmark:item partial:NO animate:YES]; if (item == bookmarkRoot || [outlineView isItemExpanded:item]) { if (item == bookmarkRoot) [indexes shiftIndexesStartingAtIndex:0 by:[outlineView rowForItem:item] + 1]; @@ -617,7 +613,7 @@ if (itemIndex != NSNotFound) { if (itemParent != parent) { if (parent && [indexes count]) - [self removeBookmarksAtIndexes:indexes ofBookmark:parent partial:YES]; + [self removeBookmarksAtIndexes:indexes ofBookmark:parent partial:YES animate:YES]; parent = itemParent; [indexes removeAllIndexes]; } @@ -625,7 +621,7 @@ } } if (parent && [indexes count]) - [self removeBookmarksAtIndexes:indexes ofBookmark:parent partial:YES]; + [self removeBookmarksAtIndexes:indexes ofBookmark:parent partial:YES animate:YES]; [ov endUpdates]; } Modified: trunk/bibdesk/BibDocument_Groups.m =================================================================== --- trunk/bibdesk/BibDocument_Groups.m 2021-06-26 17:14:47 UTC (rev 26306) +++ trunk/bibdesk/BibDocument_Groups.m 2021-06-26 17:50:26 UTC (rev 26307) @@ -959,7 +959,7 @@ BDSKSearchBookmark *newBookmark = [BDSKSearchBookmark searchBookmarkWithInfo:[group dictionaryValue] label:[bookmarkSheetController stringValue]]; if (newBookmark) { BDSKSearchBookmark *folder = [bookmarkSheetController selectedFolder] ?: [[BDSKSearchBookmarkController sharedBookmarkController] bookmarkRoot]; - [[BDSKSearchBookmarkController sharedBookmarkController] insertBookmarks:[NSArray arrayWithObjects:bookmark, nil] atIndexes:[NSIndexSet indexSetWithIndex:[folder countOfChildren]] ofBookmark:folder partial:NO]; + [[BDSKSearchBookmarkController sharedBookmarkController] insertBookmarks:[NSArray arrayWithObjects:bookmark, nil] atIndexes:[NSIndexSet indexSetWithIndex:[folder countOfChildren]] ofBookmark:folder partial:NO animate:YES]; } } }]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. _______________________________________________ Bibdesk-commit mailing list Bibdesk-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-commit