Revision: 15851
          http://sourceforge.net/p/skim-app/code/15851
Author:   hofman
Date:     2025-12-10 15:33:52 +0000 (Wed, 10 Dec 2025)
Log Message:
-----------
empty selection in source list tableview when clicking on an empty row, 
NSTableView does not do this

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

Modified: trunk/SKTableView.m
===================================================================
--- trunk/SKTableView.m 2025-12-10 11:04:26 UTC (rev 15850)
+++ trunk/SKTableView.m 2025-12-10 15:33:52 UTC (rev 15851)
@@ -41,6 +41,7 @@
 #import "NSEvent_SKExtensions.h"
 #import "NSGraphics_SKExtensions.h"
 #import "SKImageToolTipWindow.h"
+#import "SKApplication.h"
 
 #define SKImageToolTipRowNumberKey @"SKImageToolTipRow"
 #define SKImageToolTipColumnKey @"SKImageToolTipColumn"
@@ -113,8 +114,11 @@
         [[SKImageToolTipWindow sharedToolTipWindow] remove];
     if ([self allowsMultipleSelection] == NO && ([theEvent modifierFlags] & 
NSEventModifierFlagCommand) && [[self delegate] 
respondsToSelector:@selector(tableView:commandSelectRow:)]) {
         NSInteger row = [self rowAtPoint:[theEvent locationInView:self]];
-        if (row != -1 && [[self delegate] tableView:self commandSelectRow:row])
+        if (row != -1 && [NSApp willDragMouse] == NO && [[self delegate] 
tableView:self commandSelectRow:row])
             return;
+    } else if ([self allowsEmptySelection] && [self selectionHighlightStyle] 
== NSTableViewSelectionHighlightStyleSourceList && [theEvent modifierFlags] == 
0 && [self rowAtPoint:[theEvent locationInView:self]] == -1 && [self 
rowAtPoint:[theEvent locationInView:self]] == -1 && [NSApp willDragMouse] == 
NO) {
+        [self deselectAll:nil];
+        return;
     }
     [super mouseDown: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