mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): merge conflicts in image deletion listener
This commit is contained in:
parent
80e7e1293a
commit
0b5d20c9f0
@ -40,8 +40,8 @@ const deleteNodesImages = (state: RootState, dispatch: AppDispatch, imageDTO: Im
|
||||
};
|
||||
|
||||
const deleteControlAdapterImages = (state: RootState, dispatch: AppDispatch, imageDTO: ImageDTO) => {
|
||||
state.canvasV2.controlAdapters.forEach(({ id, image, processedImage }) => {
|
||||
if (image?.name === imageDTO.image_name || processedImage?.name === imageDTO.image_name) {
|
||||
state.canvasV2.controlAdapters.entities.forEach(({ id, imageObject, processedImageObject }) => {
|
||||
if (imageObject?.image.name === imageDTO.image_name || processedImageObject?.image.name === imageDTO.image_name) {
|
||||
dispatch(caImageChanged({ id, imageDTO: null }));
|
||||
dispatch(caProcessedImageChanged({ id, imageDTO: null }));
|
||||
}
|
||||
@ -49,15 +49,15 @@ const deleteControlAdapterImages = (state: RootState, dispatch: AppDispatch, ima
|
||||
};
|
||||
|
||||
const deleteIPAdapterImages = (state: RootState, dispatch: AppDispatch, imageDTO: ImageDTO) => {
|
||||
state.canvasV2.ipAdapters.forEach(({ id, imageObject: image }) => {
|
||||
if (image?.name === imageDTO.image_name) {
|
||||
state.canvasV2.ipAdapters.entities.forEach(({ id, imageObject }) => {
|
||||
if (imageObject?.image.name === imageDTO.image_name) {
|
||||
dispatch(ipaImageChanged({ id, imageDTO: null }));
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const deleteLayerImages = (state: RootState, dispatch: AppDispatch, imageDTO: ImageDTO) => {
|
||||
state.canvasV2.layers.forEach(({ id, objects }) => {
|
||||
state.canvasV2.layers.entities.forEach(({ id, objects }) => {
|
||||
let shouldDelete = false;
|
||||
for (const obj of objects) {
|
||||
if (obj.type === 'image' && obj.image.name === imageDTO.image_name) {
|
||||
|
Loading…
Reference in New Issue
Block a user