Revision: 16372
          http://sourceforge.net/p/skim-app/code/16372
Author:   hofman
Date:     2026-06-08 15:54:25 +0000 (Mon, 08 Jun 2026)
Log Message:
-----------
check only selector we want to send

Modified Paths:
--------------
    trunk/PDFView_SKExtensions.m

Modified: trunk/PDFView_SKExtensions.m
===================================================================
--- trunk/PDFView_SKExtensions.m        2026-06-08 14:42:57 UTC (rev 16371)
+++ trunk/PDFView_SKExtensions.m        2026-06-08 15:54:25 UTC (rev 16372)
@@ -92,25 +92,25 @@
     return [self descendantOfClass:[NSScrollView class]];
 }
 
-- (NSView *)safePageViewForPage:(PDFPage *)page {
+- (NSView *)safePageViewForPage:(PDFPage *)page forSelector:(SEL)selector {
     if ([self respondsToSelector:@selector(pageViewForPageAtIndex:)] == NO || 
[self isPageAtIndexDisplayed:[page pageIndex]] == NO)
         return nil;
     id pageView = [self pageViewForPageAtIndex:[page pageIndex]];
-    if ([pageView respondsToSelector:@selector(addAnnotation:)] && [pageView 
respondsToSelector:@selector(updateAnnotation:)] && [pageView 
respondsToSelector:@selector(removeAnnotation:)])
+    if ([pageView respondsToSelector:selector])
         return pageView;
     return nil;
 }
 
 - (void)updatedAnnotation:(PDFAnnotation *)annotation {
-    [[self safePageViewForPage:[annotation page]] updateAnnotation:annotation];
+    [[self safePageViewForPage:[annotation page] 
forSelector:@selector(updateAnnotation:)] updateAnnotation:annotation];
 }
 
 - (void)addedAnnotation:(PDFAnnotation *)annotation onPage:(PDFPage *)page {
-    [[self safePageViewForPage:page] addAnnotation:annotation];
+    [[self safePageViewForPage:page forSelector:@selector(addAnnotation:)] 
addAnnotation:annotation];
 }
 
 - (void)removedAnnotation:(PDFAnnotation *)annotation onPage:(PDFPage *)page {
-    [[self safePageViewForPage:page] removeAnnotation:annotation];
+    [[self safePageViewForPage:page forSelector:@selector(removeAnnotation:)] 
removeAnnotation:annotation];
 }
 
 - (void)doPdfsyncWithEvent:(NSEvent *)theEvent {

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

Reply via email to