Revision: 16256
http://sourceforge.net/p/skim-app/code/16256
Author: hofman
Date: 2026-05-09 14:10:14 +0000 (Sat, 09 May 2026)
Log Message:
-----------
check whether we dragged implicitly in event loop
Modified Paths:
--------------
trunk/SKNoteOutlineView.m
Modified: trunk/SKNoteOutlineView.m
===================================================================
--- trunk/SKNoteOutlineView.m 2026-05-08 16:32:36 UTC (rev 16255)
+++ trunk/SKNoteOutlineView.m 2026-05-09 14:10:14 UTC (rev 16256)
@@ -38,7 +38,6 @@
#import "SKNoteOutlineView.h"
#import "SKTypeSelectHelper.h"
-#import "SKApplication.h"
#import "NSGeometry_SKExtensions.h"
#import "NSMenu_SKExtensions.h"
@@ -131,22 +130,26 @@
if (item) {
NSRect rect = SKSliceRect([self rectOfRow:row],
RESIZE_EDGE_HEIGHT, [self isFlipped] ? NSRectEdgeMaxY : NSRectEdgeMinY);
- if (NSMouseInRect(mouseLoc, rect, [self isFlipped]) && [NSApp
willDragMouse]) {
+ if (NSMouseInRect(mouseLoc, rect, [self isFlipped])) {
CGFloat startHeight = [self rowHeightForItem:item] ?:
NSHeight([self rectOfRow:row]) - [self intercellSpacing].height;
+ BOOL didDrag = NO;
[[NSCursor resizeUpDownCursor] push];
- while ([theEvent type] != NSEventTypeLeftMouseUp) {
+ while (YES) {
theEvent = [[self window] nextEventMatchingMask:
NSEventMaskLeftMouseUp | NSEventMaskLeftMouseDragged];
- if ([theEvent type] == NSEventTypeLeftMouseDragged) {
- 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 ([theEvent type] == NSEventTypeLeftMouseUp)
+ break;
+ 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];
}
[NSCursor pop];
- return;
+
+ if (didDrag)
+ return;
}
}
}
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