mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
perf(ui): reset maskobjects when layer has no bbox (all objects erased)
This commit is contained in:
parent
aa2ca03056
commit
415a41e21a
@ -181,6 +181,11 @@ export const regionalPromptsSlice = createSlice({
|
||||
if (isRenderableLayer(layer)) {
|
||||
layer.bbox = bbox;
|
||||
layer.bboxNeedsUpdate = false;
|
||||
if (bbox === null && layer.type === 'masked_guidance_layer') {
|
||||
// The layer was fully erased, empty its objects to prevent accumulation of invisible objects
|
||||
layer.maskObjects = [];
|
||||
layer.needsPixelBbox = false;
|
||||
}
|
||||
}
|
||||
},
|
||||
layerReset: (state, action: PayloadAction<string>) => {
|
||||
|
Loading…
Reference in New Issue
Block a user