mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): deselect other layers when new layer added
This commit is contained in:
parent
ace3955760
commit
c2f8adf93e
@ -109,6 +109,11 @@ export const regionalPromptsSlice = createSlice({
|
||||
};
|
||||
state.layers.push(layer);
|
||||
state.selectedLayerId = layer.id;
|
||||
for (const layer of state.layers.filter(isRenderableLayer)) {
|
||||
if (layer.id !== layerId) {
|
||||
layer.isSelected = false;
|
||||
}
|
||||
}
|
||||
return;
|
||||
},
|
||||
ipAdapterLayerAdded: (state, action: PayloadAction<{ layerId: string; ipAdapterId: string }>) => {
|
||||
@ -139,6 +144,11 @@ export const regionalPromptsSlice = createSlice({
|
||||
};
|
||||
state.layers.push(layer);
|
||||
state.selectedLayerId = layer.id;
|
||||
for (const layer of state.layers.filter(isRenderableLayer)) {
|
||||
if (layer.id !== layerId) {
|
||||
layer.isSelected = false;
|
||||
}
|
||||
}
|
||||
return;
|
||||
},
|
||||
layerSelected: (state, action: PayloadAction<string>) => {
|
||||
|
Loading…
Reference in New Issue
Block a user