fix: retain prepared Ortho context for script PXP-OA
This commit is contained in:
@@ -77,7 +77,9 @@ public sealed class EntryPoint : IExtensionApplication
|
||||
// document lags behind MDI activation. Bind the planner to the
|
||||
// command document captured above, which is also the observer's
|
||||
// fixture identity.
|
||||
var context = new PlantRuntimeContextReader().ReadCurrentContext(document);
|
||||
var context = ScriptDrivenFirstApplyAutomation.TryGetPreparedContext(document, out var scriptContext)
|
||||
? scriptContext
|
||||
: new PlantRuntimeContextReader().ReadCurrentContext(document);
|
||||
var details = new Dictionary<string, object?>
|
||||
{
|
||||
["ExecutionMode"] = mode.ToString(),
|
||||
@@ -113,7 +115,8 @@ public sealed class EntryPoint : IExtensionApplication
|
||||
var applyPermit = (mode == PRecAnnotExecutionMode.Apply || hasLimitedApplyPermit) && document is not null
|
||||
? FirstLimitedApplyPermitReader.ReadFor(document)
|
||||
: null;
|
||||
var automationTarget = FirstLimitedApplyAutomationCoordinator.SelectedTargetSnapshotId;
|
||||
var automationTarget = ScriptDrivenFirstApplyAutomation.SelectedTargetSnapshotId
|
||||
?? FirstLimitedApplyAutomationCoordinator.SelectedTargetSnapshotId;
|
||||
var limitedTarget = applyPermit?.TargetSnapshotId ?? automationTarget;
|
||||
if (mode == PRecAnnotExecutionMode.Apply && context.Viewports.Count != 1)
|
||||
throw new InvalidOperationException("APPLY_REQUIRES_EXACTLY_ONE_VIEWPORT");
|
||||
|
||||
Reference in New Issue
Block a user