Revision: 14595
          http://sourceforge.net/p/skim-app/code/14595
Author:   hofman
Date:     2024-10-28 09:29:57 +0000 (Mon, 28 Oct 2024)
Log Message:
-----------
don't accept drags when hiding notes

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

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2024-10-27 16:52:12 UTC (rev 14594)
+++ trunk/SKPDFView.m   2024-10-28 09:29:57 UTC (rev 14595)
@@ -2164,7 +2164,7 @@
 - (NSDragOperation)draggingUpdated:(id <NSDraggingInfo>)sender {
     NSDragOperation dragOp = NSDragOperationNone;
     NSPasteboard *pboard = [sender draggingPasteboard];
-    if ([pboard canReadItemWithDataConformingToTypes:@[NSPasteboardTypeColor, 
SKPasteboardTypeLineStyle]]) {
+    if ([self hideNotes] == NO && [pboard 
canReadItemWithDataConformingToTypes:@[NSPasteboardTypeColor, 
SKPasteboardTypeLineStyle]]) {
         NSPoint location = [self convertPoint:[sender draggingLocation] 
fromView:nil];
         PDFPage *page = [self pageForPoint:location nearest:NO];
         if (page) {
@@ -2192,7 +2192,7 @@
 
 - (void)draggingExited:(id <NSDraggingInfo>)sender {
     NSPasteboard *pboard = [sender draggingPasteboard];
-    if ([pboard canReadItemWithDataConformingToTypes:@[NSPasteboardTypeColor, 
SKPasteboardTypeLineStyle]])
+    if ([self hideNotes] == NO && [pboard 
canReadItemWithDataConformingToTypes:@[NSPasteboardTypeColor, 
SKPasteboardTypeLineStyle]])
         [self setHighlightAnnotation:nil];
     else if ([[SKPDFView superclass] instancesRespondToSelector:_cmd])
         [super draggingExited:sender];
@@ -2201,7 +2201,7 @@
 - (BOOL)performDragOperation:(id <NSDraggingInfo>)sender {
     BOOL performedDrag = NO;
     NSPasteboard *pboard = [sender draggingPasteboard];
-    if ([pboard canReadItemWithDataConformingToTypes:@[NSPasteboardTypeColor, 
SKPasteboardTypeLineStyle]]) {
+    if ([self hideNotes] == NO && [pboard 
canReadItemWithDataConformingToTypes:@[NSPasteboardTypeColor, 
SKPasteboardTypeLineStyle]]) {
         if (highlightAnnotation) {
             if ([pboard 
canReadItemWithDataConformingToTypes:@[NSPasteboardTypeColor]]) {
                 BOOL isShift = ([NSEvent modifierFlags] & 
NSEventModifierFlagShift) != 0;

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