Revision: 12169
http://sourceforge.net/p/skim-app/code/12169
Author: hofman
Date: 2021-03-06 20:08:56 +0000 (Sat, 06 Mar 2021)
Log Message:
-----------
Don't update find highlights when new find results arrive, to avoid repreating
the animation
Modified Paths:
--------------
trunk/SKMainWindowController.h
trunk/SKMainWindowController.m
trunk/SKMainWindowController_UI.m
Modified: trunk/SKMainWindowController.h
===================================================================
--- trunk/SKMainWindowController.h 2021-03-05 17:38:38 UTC (rev 12168)
+++ trunk/SKMainWindowController.h 2021-03-06 20:08:56 UTC (rev 12169)
@@ -182,6 +182,7 @@
unsigned int updatingThumbnailSelection:1;
unsigned int isAnimating:1;
unsigned int updatingNoteSelection:1;
+ unsigned int updatingFindResults:1;
unsigned int updatingColor:1;
unsigned int updatingFont:1;
unsigned int updatingFontAttributes:1;
Modified: trunk/SKMainWindowController.m
===================================================================
--- trunk/SKMainWindowController.m 2021-03-05 17:38:38 UTC (rev 12168)
+++ trunk/SKMainWindowController.m 2021-03-06 20:08:56 UTC (rev 12169)
@@ -1904,8 +1904,10 @@
- (void)documentDidEndDocumentFind:(NSNotification *)note {
[leftSideController applySearchTableHeader:[NSString
stringWithFormat:NSLocalizedString(@"%ld Results", @"Message in search table
header"), (long)[searchResults count]]];
+ mwcFlags.updatingFindResults = 1;
[self didChangeValueForKey:GROUPEDSEARCHRESULTS_KEY];
[self didChangeValueForKey:SEARCHRESULTS_KEY];
+ mwcFlags.updatingFindResults = 0;
[statusBar stopAnimation:self];
[statusBar setProgressIndicatorStyle:SKProgressIndicatorStyleNone];
}
@@ -1914,8 +1916,10 @@
NSNumber *pageIndex = [[note userInfo]
objectForKey:@"PDFDocumentPageIndex"];
[statusBar setProgressIndicatorValue:[pageIndex doubleValue] + 1.0];
if ([pageIndex unsignedIntegerValue] % 50 == 0) {
+ mwcFlags.updatingFindResults = 1;
[self didChangeValueForKey:GROUPEDSEARCHRESULTS_KEY];
[self didChangeValueForKey:SEARCHRESULTS_KEY];
+ mwcFlags.updatingFindResults = 0;
[self willChangeValueForKey:SEARCHRESULTS_KEY];
[self willChangeValueForKey:GROUPEDSEARCHRESULTS_KEY];
}
Modified: trunk/SKMainWindowController_UI.m
===================================================================
--- trunk/SKMainWindowController_UI.m 2021-03-05 17:38:38 UTC (rev 12168)
+++ trunk/SKMainWindowController_UI.m 2021-03-06 20:08:56 UTC (rev 12169)
@@ -472,7 +472,8 @@
}
} else if ([[aNotification object]
isEqual:leftSideController.findTableView] ||
[[aNotification object]
isEqual:leftSideController.groupedFindTableView]) {
- [self selectFindResultHighlight:NSDirectSelection];
+ if (mwcFlags.updatingFindResults == 0)
+ [self selectFindResultHighlight:NSDirectSelection];
}
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit