Refactor sequence handling in App.tsx
This commit is contained in:
@@ -11485,8 +11485,6 @@ export function App({ store, initialStatusMessage }: AppProps) {
|
||||
"Selected sequence placement no longer exists."
|
||||
);
|
||||
}
|
||||
|
||||
routineId,
|
||||
const targetOption =
|
||||
resolveProjectScheduleTargetOption(targetKey);
|
||||
|
||||
@@ -11496,6 +11494,8 @@ export function App({ store, initialStatusMessage }: AppProps) {
|
||||
);
|
||||
}
|
||||
|
||||
const previousTargetKey = getControlTargetRefKey(routine.target);
|
||||
|
||||
if (targetOption.target.kind === "actor") {
|
||||
const attachedSequence =
|
||||
routine.sequenceId === null
|
||||
@@ -11510,9 +11510,7 @@ export function App({ store, initialStatusMessage }: AppProps) {
|
||||
cloneSequenceForRetargetedPlacement({
|
||||
sequence: attachedSequence,
|
||||
targetOption,
|
||||
previousTargetKey: getControlTargetRefKey(
|
||||
routine.target
|
||||
)
|
||||
previousTargetKey
|
||||
});
|
||||
sequences.sequences[retargetedSequence.id] =
|
||||
retargetedSequence;
|
||||
@@ -11573,7 +11571,6 @@ export function App({ store, initialStatusMessage }: AppProps) {
|
||||
);
|
||||
}
|
||||
|
||||
const previousTargetKey = getControlTargetRefKey(routine.target);
|
||||
const attachedSequence =
|
||||
routine.sequenceId === null
|
||||
? null
|
||||
|
||||
Reference in New Issue
Block a user