Preserve newly added prompt shots
This commit is contained in:
@@ -229,9 +229,9 @@ function configure(node) {
|
|||||||
if (redraw) render();
|
if (redraw) render();
|
||||||
};
|
};
|
||||||
const rebuildPromptAfterStructureChange = (clip) => {
|
const rebuildPromptAfterStructureChange = (clip) => {
|
||||||
// Adding/removing a shot is the one operation allowed to add/remove
|
// The caller syncs the current text before changing the slot list.
|
||||||
// marker lines. Preserve all existing shot text before formatting.
|
// Do not parse clip.prompt again here: after adding a shot it still
|
||||||
syncPrompt(clip, clip.prompt || promptFor(clip));
|
// has the old marker count, and reparsing would discard the new slot.
|
||||||
clip.prompt = formatPromptFromSlots(clip);
|
clip.prompt = formatPromptFromSlots(clip);
|
||||||
};
|
};
|
||||||
const render = () => {
|
const render = () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user