mirror of
https://github.com/Azornes/Comfyui-LayerForge.git
synced 2026-03-21 20:52:12 -03:00
Fix matting: refresh image after background removal
Fixed an issue where images were not immediately refreshed after background removal (matting). Now, the canvas updates instantly when the background is removed, ensuring correct display without requiring manual scaling or other actions.
This commit is contained in:
@@ -430,6 +430,8 @@ async function createCanvasWidget(node, widget, app) {
|
||||
delete newLayer.imageId;
|
||||
canvas.layers[selectedLayerIndex] = newLayer;
|
||||
canvas.canvasSelection.updateSelection([newLayer]);
|
||||
// Invalidate processed image cache when layer image changes (matting)
|
||||
canvas.canvasLayers.invalidateProcessedImageCache(newLayer.id);
|
||||
canvas.render();
|
||||
canvas.saveState();
|
||||
showSuccessNotification("Background removed successfully!");
|
||||
|
||||
Reference in New Issue
Block a user