Revision: 14371
          http://sourceforge.net/p/skim-app/code/14371
Author:   hofman
Date:     2024-07-10 14:56:27 +0000 (Wed, 10 Jul 2024)
Log Message:
-----------
Add new hidden preference to select area for new notes when there is no text 
selection, using temporary tool mode

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

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2024-07-10 14:32:27 UTC (rev 14370)
+++ trunk/SKPDFView.m   2024-07-10 14:56:27 UTC (rev 14371)
@@ -134,6 +134,7 @@
 
 #define SKMoveReadingBarModifiersKey @"SKMoveReadingBarModifiers"
 #define SKResizeReadingBarModifiersKey @"SKResizeReadingBarModifiers"
+#define SKNewNoteRequiresSelectionKey @"SKNewNoteRequiresSelection"
 #define SKUseToolModeCursorsKey @"SKUseToolModeCursors"
 #define SKMagnifyWithMousePressedKey @"SKMagnifyWithMousePressed"
 #define SKPacerSpeedKey @"SKPacerSpeed"
@@ -2786,7 +2787,7 @@
 }
 
 - (void)addAnnotationWithType:(SKNoteType)annotationType {
-    if ((toolMode == SKTextToolMode || toolMode == SKNoteToolMode) && 
(annotationType == SKInkNote || (IS_MARKUP(annotationType) && [[self 
currentSelection] hasCharacters] == NO))) {
+    if ((toolMode == SKTextToolMode || toolMode == SKNoteToolMode) && 
(annotationType == SKInkNote || (([[NSUserDefaults standardUserDefaults] 
boolForKey:SKNewNoteRequiresSelectionKey] || IS_MARKUP(annotationType)) && 
[[self currentSelection] hasCharacters] == NO))) {
         [self 
setTemporaryToolMode:TEMP_TOOL_MODE_FROM_NOTE_TYPE(annotationType)];
     } else {
         [self addAnnotationWithType:annotationType context:nil];

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