Movie Editor: make Reset Studio session a toggle (disarmable)
Clicking 'Reset Studio session' again now cancels a pending reset (mis-click safe); the menu shows 'armed — click to cancel' when set. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
8ce0a24c40
commit
c39af077ab
@@ -87,7 +87,7 @@
|
||||
{ label: "Refresh model list", hint: "R", action: async () => { try { await window.MovieEditorAPI.refreshModels(); } catch (_) {} } },
|
||||
],
|
||||
FunPack: [
|
||||
{ label: st.resetSessionArmed ? "Reset Studio session ✓ (armed)" : "Reset Studio session",
|
||||
{ label: st.resetSessionArmed ? "Reset Studio session ✓ armed — click to cancel" : "Reset Studio session",
|
||||
disabled: !hasProject(), action: () => S.resetStudioSession() },
|
||||
{ sep: true },
|
||||
{ menulabel: "Libraries (in ComfyUI Studio)" },
|
||||
|
||||
@@ -420,11 +420,12 @@
|
||||
});
|
||||
}
|
||||
|
||||
// Arm a Studio session reset — applied to the FIRST run of the next generation.
|
||||
// Toggle a pending Studio session reset — applied to the FIRST run of the next
|
||||
// generation. Clicking again disarms it (in case of a mis-click).
|
||||
let _resetSessionPending = false;
|
||||
function resetStudioSession() {
|
||||
_resetSessionPending = true;
|
||||
set({ resetSessionArmed: true });
|
||||
_resetSessionPending = !_resetSessionPending;
|
||||
set({ resetSessionArmed: _resetSessionPending });
|
||||
}
|
||||
|
||||
// Generate one run (single scene, or an explicit list of scene ids). Returns success.
|
||||
|
||||
Reference in New Issue
Block a user