Revision: 16255
          http://sourceforge.net/p/skim-app/code/16255
Author:   hofman
Date:     2026-05-08 16:32:36 +0000 (Fri, 08 May 2026)
Log Message:
-----------
make sure we don't select wwhen not in text or note tool mode from applescript

Modified Paths:
--------------
    trunk/SKMainDocument.m
    trunk/SKSelectCommand.m

Modified: trunk/SKMainDocument.m
===================================================================
--- trunk/SKMainDocument.m      2026-05-08 16:27:38 UTC (rev 16254)
+++ trunk/SKMainDocument.m      2026-05-08 16:32:36 UTC (rev 16255)
@@ -1816,6 +1816,9 @@
 }
 
 - (void)setSelectionSpecifier:(id)specifier {
+    SKToolMode toolMode = [[self pdfView] toolMode];
+    if (toolMode != SKToolModeText && toolMode != SKToolModeNote)
+        return;
     PDFSelection *selection = [PDFSelection selectionWithSpecifiers:specifier];
     [[self pdfView] setCurrentSelection:selection];
 }

Modified: trunk/SKSelectCommand.m
===================================================================
--- trunk/SKSelectCommand.m     2026-05-08 16:27:38 UTC (rev 16254)
+++ trunk/SKSelectCommand.m     2026-05-08 16:32:36 UTC (rev 16255)
@@ -79,6 +79,8 @@
         } else if (selection) {
             [pdfView goToSelection:selection];
             [pdfView setCurrentSelection:selection animate:animate];
+            if ([pdfView toolMode] != SKToolModeText && [pdfView toolMode] != 
SKToolModeNote)
+                [pdfView setCurrentSelection:nil];
         } else if (pdfView) {
             [pdfView setCurrentSelection:nil];
         } else {

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