Revision: 29114 http://sourceforge.net/p/bibdesk/svn/29114 Author: hofman Date: 2025-04-17 08:59:20 +0000 (Thu, 17 Apr 2025) Log Message: ----------- Revert two cases from previous commit. I am not sure whether the code is properly delayed and initiated by the run loop.
Modified Paths: -------------- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m =================================================================== --- trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m 2025-04-17 08:48:01 UTC (rev 29113) +++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FVFileView.m 2025-04-17 08:59:20 UTC (rev 29114) @@ -615,6 +615,17 @@ } } +- (void)_rescaleComplete; +{ + NSUInteger scrollIndex = [_selectionIndexes firstIndex]; + if (NSNotFound != scrollIndex) { + // this won't necessarily trigger setNeedsDisplay:, which we need unconditionally + [self scrollRectToVisible:[self _rectOfIconAtIndex:scrollIndex]]; + } + [_contentView setNeedsDisplay:YES]; + _fvFlags.isRescaling = NO; +} + - (void)setIconScale:(double)scale; { if (_fvFlags.displayMode == FVDisplayModeGrid) { @@ -640,15 +651,7 @@ if (NO == _fvFlags.isRescaling) { _fvFlags.isRescaling = YES; // this is only sent in the default runloop mode, so it's not sent during event tracking - dispatch_async(dispatch_get_main_queue(), ^{ - NSUInteger scrollIndex = [_selectionIndexes firstIndex]; - if (NSNotFound != scrollIndex) { - // this won't necessarily trigger setNeedsDisplay:, which we need unconditionally - [self scrollRectToVisible:[self _rectOfIconAtIndex:scrollIndex]]; - } - [_contentView setNeedsDisplay:YES]; - _fvFlags.isRescaling = NO; - }); + [self performSelector:@selector(_rescaleComplete) withObject:nil afterDelay:0.0]; } if (_fvFlags.updatingFromSlider == NO) @@ -2371,6 +2374,12 @@ enum { FVDrawIcon = 1<<0, FVDrawText = 1<<1, FVDrawSelected = 1<<2 }; +// redraw at full quality after a resize +- (void)_viewDidEndLiveResize { + [_contentView setNeedsDisplay:YES]; + _fvFlags.scheduledLiveResize = NO; +} + - (void)_drawIconsInRows:(NSRange)rows columns:(NSRange)columns drawOption:(NSUInteger)drawOption { BOOL isResizing = [self inLiveResize]; @@ -2404,11 +2413,7 @@ // redraw at high quality after scrolling if (useFastDrawingPath && NO == _fvFlags.scheduledLiveResize && [self _isFastScrolling]) { _fvFlags.scheduledLiveResize = YES; - // redraw at full quality after a resize - dispatch_async(dispatch_get_main_queue(), ^{ - [_contentView setNeedsDisplay:YES]; - _fvFlags.scheduledLiveResize = NO; - }); + [self performSelector:@selector(_viewDidEndLiveResize) withObject:nil afterDelay:0 inModes:[NSArray arrayWithObject:NSDefaultRunLoopMode]]; } // shadow needs to be scaled as the icon scale changes to approximate the IconServices shadow 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