Revision: 16260
http://sourceforge.net/p/skim-app/code/16260
Author: hofman
Date: 2026-05-09 20:50:09 +0000 (Sat, 09 May 2026)
Log Message:
-----------
do check for mouse drag without dequeueing, override first responder validation
only for mous down
Modified Paths:
--------------
trunk/SKNoteOutlineView.m
Modified: trunk/SKNoteOutlineView.m
===================================================================
--- trunk/SKNoteOutlineView.m 2026-05-09 16:13:07 UTC (rev 16259)
+++ trunk/SKNoteOutlineView.m 2026-05-09 20:50:09 UTC (rev 16260)
@@ -38,6 +38,7 @@
#import "SKNoteOutlineView.h"
#import "SKTypeSelectHelper.h"
+#import "SKApplication.h"
#import "NSGeometry_SKExtensions.h"
#import "NSMenu_SKExtensions.h"
@@ -130,27 +131,22 @@
if (item) {
NSRect rect = SKSliceRect([self rectOfRow:row],
RESIZE_EDGE_HEIGHT, [self isFlipped] ? NSRectEdgeMaxY : NSRectEdgeMinY);
- if (NSMouseInRect(mouseLoc, rect, [self isFlipped])) {
+ if (NSMouseInRect(mouseLoc, rect, [self isFlipped]) && [NSApp
willDragMouse]) {
CGFloat startHeight = [self rowHeightForItem:item] ?:
NSHeight([self rectOfRow:row]) - [self intercellSpacing].height;
- BOOL didDrag = NO;
+ [[NSCursor resizeUpDownCursor] push];
+
while (YES) {
theEvent = [[self window] nextEventMatchingMask:
NSEventMaskLeftMouseUp | NSEventMaskLeftMouseDragged];
if ([theEvent type] == NSEventTypeLeftMouseUp)
break;
- if (didDrag == NO) {
- [[NSCursor resizeUpDownCursor] push];
- didDrag = YES;
- }
CGFloat currentHeight = fmax([self rowHeight],
round(startHeight + [self convertPoint:[theEvent locationInWindow]
fromView:nil].y - mouseLoc.y));
[self setRowHeight:currentHeight forItem:item];
[self noteHeightOfRowChanged:row animating:NO];
}
- if (didDrag) {
- [NSCursor pop];
- return;
- }
+ [NSCursor pop];
+ return;
}
}
}
@@ -158,7 +154,7 @@
}
- (BOOL)validateProposedFirstResponder:(NSResponder *)responder
forEvent:(NSEvent *)event {
- if ([responder isKindOfClass:[NSTextField class]] && [(NSTextField
*)responder isEditable]) {
+ if ([responder isKindOfClass:[NSTextField class]] && [(NSTextField
*)responder isEditable] && [event type] == NSEventTypeLeftMouseDown && [event
clickCount] == 1) {
NSPoint mouseLoc = [self convertPoint:[event locationInWindow]
fromView:nil];
NSInteger row = [self rowAtPoint:mouseLoc];
if (row != -1 && NSMouseInRect(mouseLoc, SKSliceRect([self
rectOfRow:row], RESIZE_EDGE_HEIGHT, [self isFlipped] ? NSRectEdgeMaxY :
NSRectEdgeMinY), [self isFlipped]))
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