Refresh shot track after prompt paste
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user