fix: make pen drafts immediate and serializable, reject stale edits, and align tracked path ROI and optical flow with local reference evidence

这个提交包含在:
mac 于 2026-11-01 23:15:31 +08:00 提交
1 父节点 38adc259e0
当前提交 0b53fdcdfd
9 个文件已更改
+522 -55

没有与搜索条件相匹配的文件

@@ -23,5 +23,8 @@
redraw();click(180,280);click(450,260);click(330,145);[NSNotificationCenter.defaultCenter postNotificationName:@"DYToolCanvasCommand" object:host userInfo:@{@"node":@"base:hsl",@"mask":maskID,@"command":@"finish",@"timeValue":@0,@"timeScale":@1,@"timeEpoch":@0}];drain();NSDictionary *buttonSaved=DYReadTools(base,kCMTimeZero).document;run.record(@"pen-inspector-finish-commits-without-viewer-keyboard-focus",![buttonSaved isEqual:author]&&base->_undoStarts==undo+2&&[[buttonSaved[@"baseMasks"][@"hsl"]lastObject][@"nodes"]length]==3*sizeof(DYBezierNode));
redraw();click(160,270);[NSNotificationCenter.defaultCenter postNotificationName:@"DYToolCanvasCommand" object:host userInfo:@{@"node":@"base:hsl",@"mask":maskID,@"command":@"cancel",@"timeValue":@0,@"timeScale":@1,@"timeEpoch":@0}];drain();run.record(@"pen-inspector-cancel-preserves-saved-curve-and-undo-count",[DYReadTools(base,kCMTimeZero).document isEqual:buttonSaved]&&base->_undoStarts==undo+2);
redraw();click(190,280);click(460,280);click(300,150);[osc keyDownAtPositionX:300 positionY:150 keyPressed:13 modifiers:0 forceUpdate:&update didHandle:&handled atTime:kCMTimeZero];drain();run.record(@"pen-return-closes-and-saves-native-path",handled&&base->_undoStarts==undo+3&&![[plugin toolCanvasMaskAtTime:kCMTimeZero][@"drawing"]boolValue]);
// Finish and the next drag can arrive before the main queue gets a turn.
redraw();click(170,275);click(445,275);click(300,140);int queuedUndo=base->_undoStarts;[osc keyDownAtPositionX:300 positionY:140 keyPressed:13 modifiers:0 forceUpdate:&update didHandle:&handled atTime:kCMTimeZero];[osc mouseDownAtPositionX:320 positionY:212.5 activePart:1 modifiers:0 forceUpdate:&update atTime:kCMTimeZero];[osc mouseDraggedAtPositionX:348 positionY:196.75 activePart:1 modifiers:0 forceUpdate:&update atTime:kCMTimeZero];[osc mouseUpAtPositionX:348 positionY:196.75 activePart:1 modifiers:0 forceUpdate:&update atTime:kCMTimeZero];drain();NSDictionary *queuedDoc=DYReadTools(base,kCMTimeZero).document;DYMaskParameters moved=DYMaskAtTime([queuedDoc[@"baseMasks"][@"hsl"]lastObject],kCMTimeZero);run.record(@"pen-finish-and-next-gesture-serialize-without-dropping-either",base->_undoStarts==queuedUndo+2&&fabs(moved.centerX-.55)<1e-5&&fabs(moved.centerY-.55)<1e-5);
redraw();click(170,275);click(445,275);click(300,140);[osc keyDownAtPositionX:300 positionY:140 keyPressed:13 modifiers:0 forceUpdate:&update didHandle:&handled atTime:CMTimeMake(1,25)];drain();run.record(@"pen-refuses-to-finish-stale-draft-after-playhead-moves",[DYReadTools(base,kCMTimeZero).document isEqual:queuedDoc]&&base->_undoStarts==queuedUndo+2&&![[plugin toolCanvasMaskAtTime:CMTimeMake(1,25)][@"drawing"]boolValue]);
[osc release];[plugin release];
}