fix issue #10 (inputs widgets reappear)
https://github.com/crystian/ComfyUI-Crystools/issues/10
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@
|
||||
@author: Crystian
|
||||
@title: Crystools-save
|
||||
@nickname: Crystools-save
|
||||
@version: 1.1.1
|
||||
@version: 1.1.2
|
||||
@project: "https://github.com/crystian/ComfyUI-Crystools-save",
|
||||
@description: With this quality of life extension, you can save your workflow with a specific name and include additional details such as the author, a description, and the version (in metadata/json) IG: https://www.instagram.com/crystian.ia
|
||||
"""
|
||||
|
||||
+9
-2
@@ -100,15 +100,22 @@ class CrystoolsSave {
|
||||
};
|
||||
|
||||
setup() {
|
||||
app.graph.onConfigure = (a) => {
|
||||
// save the original onConfigure event
|
||||
const onConfigure = app.graph.onConfigure;
|
||||
app.graph.onConfigure = () => {
|
||||
// when load a workflow from file pass here!
|
||||
// on drops a file on the canvas
|
||||
this.getInfoOnGraph().then((p) => {
|
||||
|
||||
if (!p.workflow.extra.info) {
|
||||
p.workflow.extra.info = {};
|
||||
p.workflow.extra.info = {
|
||||
name: this.defaultProjectNameText,
|
||||
};
|
||||
}
|
||||
|
||||
app.ui.settings.setSettingValue(this.idProjectNameText, p.workflow.extra.info.name);
|
||||
this.setInfoOnGraph(p.workflow.extra.info);
|
||||
onConfigure?.apply(this, arguments); // recall the original event
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user