Revision: 12794 http://sourceforge.net/p/skim-app/code/12794 Author: hofman Date: 2022-02-17 14:55:24 +0000 (Thu, 17 Feb 2022) Log Message: ----------- Collate reloading of notes table when e.g. bounds changes, as this can come often when moving a note
Modified Paths: -------------- trunk/SKMainWindowController.m Modified: trunk/SKMainWindowController.m =================================================================== --- trunk/SKMainWindowController.m 2022-02-16 15:31:35 UTC (rev 12793) +++ trunk/SKMainWindowController.m 2022-02-17 14:55:24 UTC (rev 12794) @@ -109,6 +109,7 @@ #import "SKThumbnailView.h" #import "SKDocumentController.h" #import "NSColor_SKExtensions.h" +#import "NSObject_SKExtensions.h" #define MULTIPLICATION_SIGN_CHARACTER (unichar)0x00d7 @@ -2389,6 +2390,11 @@ return NO; } +- (void)reloadNotesTable { + [rightSideController.noteArrayController rearrangeObjects]; + [rightSideController.noteOutlineView reloadData]; +} + - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { if (context == &SKMainWindowDefaultsObservationContext) { @@ -2560,8 +2566,7 @@ NSMapRemove(rowHeights, [note noteText]); } if ([self notesNeedReloadForKey:keyPath]) { - [rightSideController.noteArrayController rearrangeObjects]; - [rightSideController.noteOutlineView reloadData]; + [self performSelectorOnce:@selector(reloadNotesTable) afterDelay:0.0]; } else if ([keyPath isEqualToString:SKNPDFAnnotationStringKey] || [keyPath isEqualToString:SKNPDFAnnotationTextKey]) { [rightSideController.noteOutlineView reloadTypeSelectStrings]; 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