mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-04-20 03:13:30 +00:00
Fix add selected nodes to empty group
This commit is contained in:
parent
7d5d0fd577
commit
e8c02219ee
@ -75,6 +75,15 @@ app.registerExtension({
|
|||||||
group.recomputeInsideNodes();
|
group.recomputeInsideNodes();
|
||||||
const nodesInGroup = group._nodes;
|
const nodesInGroup = group._nodes;
|
||||||
|
|
||||||
|
options.push({
|
||||||
|
content: "Add Selected Nodes To Group",
|
||||||
|
disabled: !Object.keys(app.canvas.selected_nodes || {}).length,
|
||||||
|
callback: () => {
|
||||||
|
addNodesToGroup(group, this.selected_nodes)
|
||||||
|
this.graph.change();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// No nodes in group, return default options
|
// No nodes in group, return default options
|
||||||
if (nodesInGroup.length === 0) {
|
if (nodesInGroup.length === 0) {
|
||||||
return options;
|
return options;
|
||||||
@ -92,15 +101,6 @@ app.registerExtension({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
options.push({
|
|
||||||
content: "Add Selected Nodes To Group",
|
|
||||||
disabled: !Object.keys(app.canvas.selected_nodes || {}).length,
|
|
||||||
callback: () => {
|
|
||||||
addNodesToGroup(group, this.selected_nodes)
|
|
||||||
this.graph.change();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
options.push({
|
options.push({
|
||||||
content: "Fit Group To Nodes",
|
content: "Fit Group To Nodes",
|
||||||
callback: () => {
|
callback: () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user