mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): do not delete all layers when using image as initial image
This commit is contained in:
parent
5734a97c55
commit
c05e52ebae
@ -627,7 +627,7 @@ export const controlLayersSlice = createSlice({
|
|||||||
reducer: (state, action: PayloadAction<{ layerId: string; imageDTO: ImageDTO | null }>) => {
|
reducer: (state, action: PayloadAction<{ layerId: string; imageDTO: ImageDTO | null }>) => {
|
||||||
const { layerId, imageDTO } = action.payload;
|
const { layerId, imageDTO } = action.payload;
|
||||||
// Highlander! There can be only one!
|
// Highlander! There can be only one!
|
||||||
state.layers = state.layers.filter((l) => isInitialImageLayer(l));
|
state.layers = state.layers.filter((l) => (isInitialImageLayer(l) ? false : true));
|
||||||
const layer: InitialImageLayer = {
|
const layer: InitialImageLayer = {
|
||||||
id: layerId,
|
id: layerId,
|
||||||
type: 'initial_image_layer',
|
type: 'initial_image_layer',
|
||||||
|
Loading…
Reference in New Issue
Block a user