-
Notifications
You must be signed in to change notification settings - Fork 385
fix mask editor bug under vueNodes #5953
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -380,11 +380,15 @@ export class ComfyApp { | |
const paintedIndex = selectedIndex + 1 | ||
const combinedIndex = selectedIndex + 2 | ||
|
||
// for vueNodes mode | ||
const images = | ||
node.images ?? useNodeOutputStore().getNodeOutputs(node)?.images | ||
|
||
ComfyApp.clipspace = { | ||
widgets: widgets, | ||
imgs: imgs, | ||
original_imgs: orig_imgs, | ||
images: node.images, | ||
images: images, | ||
selectedIndex: selectedIndex, | ||
img_paste_mode: 'selected', // reset to default im_paste_mode state on copy action | ||
paintedIndex: paintedIndex, | ||
|
@@ -411,7 +415,8 @@ export class ComfyApp { | |
ComfyApp.clipspace.imgs[ComfyApp.clipspace.combinedIndex].src | ||
} | ||
if (ComfyApp.clipspace.imgs && node.imgs) { | ||
if (node.images && ComfyApp.clipspace.images) { | ||
// Update node.images even if it's initially undefined (vueNodes mode) | ||
if (ComfyApp.clipspace.images) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [quality] high Priority Issue: Logic condition removed may cause null reference errors There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we need to remove this confition as under VueNodes, node.images will be undefined and need to be updated |
||
if (ComfyApp.clipspace['img_paste_mode'] == 'selected') { | ||
node.images = [ | ||
ComfyApp.clipspace.images[ComfyApp.clipspace['selectedIndex']] | ||
|
@@ -513,6 +518,8 @@ export class ComfyApp { | |
} | ||
|
||
app.graph.setDirtyCanvas(true) | ||
|
||
useNodeOutputStore().updateNodeImages(node) | ||
} | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is necessary? How can the node be unselected if this is being called?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.