mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-22 07:44:11 +00:00
Fix duplication of persisted workflow (#2124)
Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
@@ -21,8 +21,9 @@ import { useWorkspaceStore } from '@/stores/workspaceStore'
|
||||
|
||||
export function useCoreCommands(): ComfyCommand[] {
|
||||
const workflowService = useWorkflowService()
|
||||
const workflowStore = useWorkflowStore()
|
||||
const dialogService = useDialogService()
|
||||
const getTracker = () => useWorkflowStore()?.activeWorkflow?.changeTracker
|
||||
const getTracker = () => workflowStore.activeWorkflow?.changeTracker
|
||||
|
||||
const getSelectedNodes = (): LGraphNode[] => {
|
||||
const selectedNodes = app.canvas.selected_nodes
|
||||
@@ -512,6 +513,15 @@ export function useCoreCommands(): ComfyCommand[] {
|
||||
function: () => {
|
||||
dialogService.showSettingsDialog('about')
|
||||
}
|
||||
},
|
||||
{
|
||||
id: 'Comfy.DuplicateWorkflow',
|
||||
icon: 'pi pi-clone',
|
||||
label: 'Duplicate Current Workflow',
|
||||
versionAdded: '1.6.15',
|
||||
function: () => {
|
||||
workflowService.duplicateWorkflow(workflowStore.activeWorkflow!)
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user