Keep the clone identity through the host test document replacement
这个提交包含在:
1 父节点
1f1b7917e7
当前提交
dff9134be7
1 个文件已更改
+5
-4
@@ -117,8 +117,9 @@
|
||||
DYMaskParameters target=DYMaskAtTime(stamp,kCMTimeZero);
|
||||
run.record(@"native-osc-creates-one-stamp-and-one-undo-from-source-click-and-drag",source.count==4&&fabs([source[0]doubleValue]-.25)<1e-6&&fabs([source[1]doubleValue]-.25)<1e-6&&fabs(target.centerX-.65)<1e-6&&fabs(target.centerY-.5)<1e-6&&base->_undoStarts==undo+1&&base->_undoEnds==undo+1);
|
||||
[osc drawOSCWithWidth:640 height:400 activePart:0 destinationImage:overlay atTime:kCMTimeZero];
|
||||
NSString *stampID=[[stamp[@"id"]copy]autorelease];
|
||||
NSMutableDictionary *tracked=DYMutablePlist(DYReadTools(host,kCMTimeZero).document);
|
||||
NSMutableDictionary *trackedStamp=(id)DYSharedMaskWithID(tracked,stamp[@"id"]);
|
||||
NSMutableDictionary *trackedStamp=(id)DYSharedMaskWithID(tracked,stampID);
|
||||
DYMaskParameters moved=target;moved.centerX+=.05f;
|
||||
NSArray *keys=@[DYMaskKey(kCMTimeZero,target,NO,1),DYMaskKey(CMTimeMake(1,25),moved,NO,1)];
|
||||
trackedStamp[@"keys"]=keys;DYWriteTools(host,tracked,kCMTimeZero);
|
||||
@@ -129,16 +130,16 @@
|
||||
[osc mouseDraggedAtPositionX:236 positionY:259.75 activePart:part modifiers:0 forceUpdate:&update atTime:kCMTimeZero];
|
||||
NSArray *preview=[plugin toolCanvasMaskAtTime:kCMTimeZero][@"stampSource"];
|
||||
up(236,259.75,part);drain();
|
||||
NSDictionary *edited=DYSharedMaskWithID(DYReadTools(host,kCMTimeZero).document,stamp[@"id"]);
|
||||
NSDictionary *edited=DYSharedMaskWithID(DYReadTools(host,kCMTimeZero).document,stampID);
|
||||
NSArray *relocated=edited[@"stampSource"];
|
||||
run.record(@"native-osc-drag-moves-only-the-stamp-source-and-keeps-tracking-keys",part==7&&fabs([relocated[0]doubleValue]-.35)<1e-6&&fabs([relocated[1]doubleValue]-.35)<1e-6&&[relocated isEqual:preview]&&[edited[@"parameters"]isEqual:trackedStamp[@"parameters"]]&&[edited[@"keys"]isEqual:keys]&&base->_undoStarts==undo+1&&base->_undoEnds==undo+1);
|
||||
run.record(@"native-osc-drag-moves-only-the-stamp-source-and-keeps-tracking-keys",part==7&&fabs([relocated[0]doubleValue]-.35)<1e-6&&fabs([relocated[1]doubleValue]-.35)<1e-6&&[relocated isEqual:preview]&&[edited[@"parameters"]isEqual:trackedStamp[@"parameters"]]&&[edited[@"keys"]isEqual:keys]&&base->_undoStarts==undo+1&&base->_undoEnds==undo+1,@{@"part":@(part),@"source":relocated?:@[],@"keys":@([edited[@"keys"]count]),@"undoGroups":@(base->_undoStarts-undo)});
|
||||
[osc drawOSCWithWidth:640 height:400 activePart:0 destinationImage:overlay atTime:kCMTimeZero];
|
||||
part=down(236,259.75);
|
||||
[osc mouseDraggedAtPositionX:270 positionY:240 activePart:part modifiers:0 forceUpdate:&update atTime:kCMTimeZero];
|
||||
BOOL handled=NO;
|
||||
[osc keyDownAtPositionX:270 positionY:240 keyPressed:27 modifiers:0 forceUpdate:&update didHandle:&handled atTime:kCMTimeZero];
|
||||
drain();
|
||||
run.record(@"native-osc-escape-cancels-the-stamp-source-drag-without-another-undo",handled&&[DYSharedMaskWithID(DYReadTools(host,kCMTimeZero).document,stamp[@"id"])[@"stampSource"]isEqual:relocated]&&base->_undoStarts==undo+1);
|
||||
run.record(@"native-osc-escape-cancels-the-stamp-source-drag-without-another-undo",handled&&[DYSharedMaskWithID(DYReadTools(host,kCMTimeZero).document,stampID)[@"stampSource"]isEqual:relocated]&&base->_undoStarts==undo+1);
|
||||
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();[(id)osc release];[(id)plugin release];
|
||||
|
||||
在新工单中引用
屏蔽一个用户