Revision: 16223
          http://sourceforge.net/p/skim-app/code/16223
Author:   hofman
Date:     2026-05-05 15:01:28 +0000 (Tue, 05 May 2026)
Log Message:
-----------
don't select note when we cannot select

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

Modified: trunk/SKMainWindowController_Actions.m
===================================================================
--- trunk/SKMainWindowController_Actions.m      2026-05-05 14:55:13 UTC (rev 
16222)
+++ trunk/SKMainWindowController_Actions.m      2026-05-05 15:01:28 UTC (rev 
16223)
@@ -210,7 +210,7 @@
 }
 
 - (void)selectSelectedNote:(id)sender{
-    if ([pdfView hideNotes] == NO) {
+    if ([pdfView hideNotes] == NO && [self hasOverview] == NO) {
         NSIndexSet *rowIndexes = [sender selectedRowIndexes];
         if ([rowIndexes count] == 1) {
             id item = [sender itemAtRow:[rowIndexes firstIndex]];
@@ -217,11 +217,13 @@
             PDFAnnotation *annotation = nil;
             if ([(PDFAnnotation *)item type]) {
                 annotation = item;
-                NSInteger column = [sender clickedColumn];
-                if (column != -1) {
-                    NSString *colID = [[[sender tableColumns] 
objectAtIndex:column] identifier];
-                    if ([colID isEqualToString:@"color"])
-                        [[NSColorPanel sharedColorPanel] orderFront:nil];
+                if ([pdfView canSelectNote]) {
+                    NSInteger column = [sender clickedColumn];
+                    if (column != -1) {
+                        NSString *colID = [[[sender tableColumns] 
objectAtIndex:column] identifier];
+                        if ([colID isEqualToString:@"color"])
+                            [[NSColorPanel sharedColorPanel] orderFront:nil];
+                    }
                 }
             } else {
                 annotation = [(SKNoteText *)item note];
@@ -233,7 +235,8 @@
                 }
             }
             [pdfView scrollAnnotationToVisible:annotation];
-            [pdfView setCurrentAnnotation:annotation];
+            if ([pdfView canSelectNote])
+                [pdfView setCurrentAnnotation:annotation];
         }
     } else NSBeep();
 }

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