Revision: 14799
http://sourceforge.net/p/skim-app/code/14799
Author: hofman
Date: 2024-12-09 10:18:49 +0000 (Mon, 09 Dec 2024)
Log Message:
-----------
Avoid dirtying too much, check fixed condition first
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2024-12-09 09:58:25 UTC (rev 14798)
+++ trunk/SKPDFView.m 2024-12-09 10:18:49 UTC (rev 14799)
@@ -2835,12 +2835,12 @@
}
- (void)updatedAnnotation:(PDFAnnotation *)annotation
affectingHighlight:(BOOL)affectingHighlight fromRect:(NSRect)oldRect {
- if (annotation == currentAnnotation && atomic_load(&highlightLayerState)
!= SKLayerUse && affectingHighlight) {
+ if (affectingHighlight && annotation == currentAnnotation &&
atomic_load(&highlightLayerState) != SKLayerUse) {
PDFPage *page = [annotation page];
- NSRect rect = NSUnionRect([annotation bounds], oldRect);
CGFloat margin = (([annotation isResizable] || [annotation isNote]) ?
HANDLE_SIZE : 1.0) / [self scaleFactor];
- rect = NSInsetRect(rect, -margin, -margin);
- [self setNeedsDisplayInRect:rect ofPage:page];
+ [self setNeedsDisplayInRect:NSInsetRect([annotation bounds], -margin,
-margin) ofPage:page];
+ if (NSEqualRects(oldRect, NSZeroRect) == NO)
+ [self setNeedsDisplayInRect:NSInsetRect(oldRect, -margin, -margin)
ofPage:page];
} else {
[loupeController updateContents];
}
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