Refresh shot track after prompt paste

This commit is contained in:
2026-10-30 11:37:50 +00:00
parent 1684c6a849
commit 999f3a9443
+8 -2
View File
@@ -557,11 +557,17 @@ function configure(node) {
// Let the browser insert the pasted text first, then parse its // Let the browser insert the pasted text first, then parse its
// shot markers and redraw the track without losing the paste. // shot markers and redraw the track without losing the paste.
setTimeout(() => { setTimeout(() => {
const changed = syncPrompt(clip, prompt.value); syncPrompt(clip, prompt.value);
promptText = prompt.value; promptText = prompt.value;
clip.prompt = prompt.value; clip.prompt = prompt.value;
persistState(); persistState();
if (changed) render(); // A paste can change the text of an existing shot without
// adding/removing shot markers. Redraw in both cases so the
// timeline labels and shot chips reflect the pasted text.
// The previous conditional left the shot track stale when
// syncPrompt returned false for plain or partially formatted
// pasted text.
render();
}, 0); }, 0);
}; };
prompt.onselect = rememberPromptSelection; prompt.onselect = rememberPromptSelection;