mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-02-13 18:25:28 -05:00
fix(ui): after canceling a filter, layer loses its content
This commit is contained in:
@@ -424,9 +424,15 @@ export class CanvasEntityFilterer extends CanvasModuleBase {
|
||||
// the user has applied the filter and the image has been adopted by the parent entity.
|
||||
if (this.imageModule && this.imageModule.konva.group.parent === this.konva.group) {
|
||||
this.imageModule.destroy();
|
||||
this.imageModule = null;
|
||||
}
|
||||
|
||||
// When a filter is applied, the image module is adopted by the parent entity as a "permanent" module.
|
||||
// Null this reference to prevent the filter module from accidentally trying to destroy a module that the
|
||||
// parent entity is now responsible for.
|
||||
this.imageModule = null;
|
||||
|
||||
const initialFilterConfig = deepClone(this.$initialFilterConfig.get() ?? this.createInitialFilterConfig());
|
||||
|
||||
this.$filterConfig.set(initialFilterConfig);
|
||||
this.$imageState.set(null);
|
||||
this.$lastProcessedHash.set('');
|
||||
|
||||
Reference in New Issue
Block a user