Revision: 14912
http://sourceforge.net/p/skim-app/code/14912
Author: hofman
Date: 2025-02-02 09:59:35 +0000 (Sun, 02 Feb 2025)
Log Message:
-----------
call original implementations to fix start/end points on 10.13 so KVO and undo
will not be triggered, as the bug will also not trigger KVO for these keys
Modified Paths:
--------------
trunk/PDFAnnotationLine_SKExtensions.m
Modified: trunk/PDFAnnotationLine_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationLine_SKExtensions.m 2025-02-01 18:00:45 UTC (rev
14911)
+++ trunk/PDFAnnotationLine_SKExtensions.m 2025-02-02 09:59:35 UTC (rev
14912)
@@ -63,18 +63,23 @@
@implementation PDFAnnotationLine (SKExtensions)
static void (*original_setBounds)(id, SEL, NSRect) = NULL;
+static void (*original_setStartPoint)(id, SEL, NSPoint) = NULL;
+static void (*original_setEndPoint)(id, SEL, NSPoint) = NULL;
static void replacement_setBounds(id self, SEL _cmd , NSRect newBounds) {
NSPoint startPoint = [self startPoint];
NSPoint endPoint = [self endPoint];
original_setBounds(self, _cmd, newBounds);
- [self setStartPoint:startPoint];
- [self setEndPoint:endPoint];
+ original_setStartPoint(self, @selector(setStartPoint:), startPoint);
+ original_setEndPoint(self, @selector(setEndPoint:), endPoint);
}
+ (void)load {
- if (@available(macOS 10.14, *)) {} else
+ if (@available(macOS 10.14, *)) {} else {
original_setBounds = (void (*)(id, SEL,
NSRect))SKReplaceInstanceMethodImplementation(self, @selector(setBounds:),
(IMP)replacement_setBounds);
+ original_setStartPoint = (void (*)(id, SEL, NSPoint))[self
instanceMethodForSelector:@selector(setStartPoint:)];
+ original_setEndPoint = (void (*)(id, SEL, NSPoint))[self
instanceMethodForSelector:@selector(setEndPoint:)];
+ }
}
- (void)setDefaultSkimNoteProperties {
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