Persist clone stamp edits using the host action time

这个提交包含在:
mac 于 2026-11-06 00:01:33 +08:00 提交
1 父节点 b2601ac9b0
当前提交 7bf1f88fe9
4 个文件已更改
+42 -13

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

@@ -128,7 +128,6 @@
run.record(@"native-osc-stamp-selects-saved-overlay-when-action-time-differs",
stamp&&[[plugin toolCanvasMaskAtTime:actionTime][@"id"]isEqual:stamp[@"id"]]&&
![[viewer valueForKey:@"stampArmed"]boolValue]&&![[(id)osc valueForKey:@"stampSaving"]boolValue]);
host->_time=kCMTimeZero;
[osc drawOSCWithWidth:640 height:400 activePart:0 destinationImage:overlay atTime:kCMTimeZero];
NSString *stampID=[[stamp[@"id"]copy]autorelease];
NSMutableDictionary *tracked=DYMutablePlist(DYReadTools(host,kCMTimeZero).document);
@@ -162,6 +161,19 @@
NSDictionary *resized=DYSharedMaskWithID(DYReadTools(host,kCMTimeZero).document,stampID);
DYMaskParameters enlarged=DYMaskAtTime(resized,kCMTimeZero);
run.record(@"native-osc-stamp-resizes-coverage-without-rotation-handle-or-track-changes",!rotationHandle&&part==2&&enlarged.width>target.width&&enlarged.height>target.height&&enlarged.centerX==target.centerX&&enlarged.centerY==target.centerY&&[resized[@"keys"]isEqual:keys]);
[osc drawOSCWithWidth:640 height:400 activePart:0 destinationImage:overlay atTime:kCMTimeZero];
undo=base->_undoStarts;
part=down(404,212.5);
[osc mouseDraggedAtPositionX:460 positionY:196.75 activePart:part modifiers:0 forceUpdate:&update atTime:kCMTimeZero];
up(460,196.75,part);drain();
NSDictionary *repositioned=DYSharedMaskWithID(DYReadTools(host,kCMTimeZero).document,stampID);
NSArray *editedKeys=repositioned[@"keys"];
DYMaskParameters trackedCenter=DYMaskAtTime(repositioned,kCMTimeZero);
run.record(@"native-osc-stamp-target-move-saves-the-canvas-key-with-a-different-action-time",
part==1&&fabs(trackedCenter.centerX-.75)<1e-6&&fabs(trackedCenter.centerY-.55)<1e-6&&
editedKeys.count==2&&[editedKeys[0][@"manual"]boolValue]&&[editedKeys[1]isEqual:keys[1]]&&
base->_undoStarts==undo+1&&base->_undoEnds==undo+1);
host->_time=kCMTimeZero;
click(251,104);drain(); // top-down viewport y=30...345, forward button is x=212...290.
run.record(@"native-osc-stamp-forward-action-starts-the-existing-host-tracker",host->_forwardStarts==1&&host->_backwardStarts==0);
[plugin cleanupAnalysis:nil];drain();
@@ -180,5 +192,18 @@
run.record(@"native-osc-stamp-retries-with-the-same-source-and-saves-once",
afterRetry.count==DYSharedMasks(beforeRejected).count+1&&
[afterRetry.lastObject[@"stampSource"]isEqual:source]&&![[viewer valueForKey:@"stampArmed"]boolValue]);
NSString *untrackedID=[[afterRetry.lastObject[@"id"]copy]autorelease];
[osc drawOSCWithWidth:640 height:400 activePart:0 destinationImage:overlay atTime:kCMTimeZero];
host->_time=actionTime;
undo=base->_undoStarts;
part=down(404,212.5);
[osc mouseDraggedAtPositionX:460 positionY:196.75 activePart:part modifiers:0 forceUpdate:&update atTime:kCMTimeZero];
up(460,196.75,part);drain();
NSDictionary *untracked=DYSharedMaskWithID(DYReadTools(host,kCMTimeZero).document,untrackedID);
DYMaskParameters untrackedCenter=DYMaskAtTime(untracked,kCMTimeZero);
run.record(@"native-osc-untracked-stamp-target-saves-in-place-with-a-different-action-time",
part==1&&fabs(untrackedCenter.centerX-.75)<1e-6&&fabs(untrackedCenter.centerY-.55)<1e-6&&
![untracked[@"keys"]count]&&[untracked[@"stampSource"]isEqual:source]&&
base->_undoStarts==undo+1&&base->_undoEnds==undo+1);
[(id)osc release];[(id)plugin release];
}