mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Fixes: inpaint canvas not cleared when its src image is deleted
This commit is contained in:
parent
101fe9efa9
commit
e1cb5b8251
1
frontend/dist/assets/index.352e4760.css
vendored
Normal file
1
frontend/dist/assets/index.352e4760.css
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
frontend/dist/assets/index.ff30f6a0.css
vendored
1
frontend/dist/assets/index.ff30f6a0.css
vendored
File diff suppressed because one or more lines are too long
4
frontend/dist/index.html
vendored
4
frontend/dist/index.html
vendored
@ -6,8 +6,8 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>InvokeAI - A Stable Diffusion Toolkit</title>
|
<title>InvokeAI - A Stable Diffusion Toolkit</title>
|
||||||
<link rel="shortcut icon" type="icon" href="./assets/favicon.0d253ced.ico" />
|
<link rel="shortcut icon" type="icon" href="./assets/favicon.0d253ced.ico" />
|
||||||
<script type="module" crossorigin src="./assets/index.18143ecd.js"></script>
|
<script type="module" crossorigin src="./assets/index.64b87783.js"></script>
|
||||||
<link rel="stylesheet" href="./assets/index.ff30f6a0.css">
|
<link rel="stylesheet" href="./assets/index.352e4760.css">
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
@ -33,7 +33,7 @@ import {
|
|||||||
setMaskPath,
|
setMaskPath,
|
||||||
} from '../../features/options/optionsSlice';
|
} from '../../features/options/optionsSlice';
|
||||||
import { requestImages, requestNewImages } from './actions';
|
import { requestImages, requestNewImages } from './actions';
|
||||||
import { setImageToInpaint } from '../../features/tabs/Inpainting/inpaintingSlice';
|
import { clearImageToInpaint, setImageToInpaint } from '../../features/tabs/Inpainting/inpaintingSlice';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns an object containing listener callbacks for socketio events.
|
* Returns an object containing listener callbacks for socketio events.
|
||||||
@ -271,11 +271,16 @@ const makeSocketIOListeners = (
|
|||||||
|
|
||||||
// remove references to image in options
|
// remove references to image in options
|
||||||
const { initialImage, maskPath } = getState().options;
|
const { initialImage, maskPath } = getState().options;
|
||||||
|
const { imageToInpaint } = getState().inpainting;
|
||||||
|
|
||||||
if (initialImage?.url === url || initialImage === url) {
|
if (initialImage?.url === url || initialImage === url) {
|
||||||
dispatch(clearInitialImage());
|
dispatch(clearInitialImage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (imageToInpaint?.url === url) {
|
||||||
|
dispatch(clearImageToInpaint());
|
||||||
|
}
|
||||||
|
|
||||||
if (maskPath === url) {
|
if (maskPath === url) {
|
||||||
dispatch(setMaskPath(''));
|
dispatch(setMaskPath(''));
|
||||||
}
|
}
|
||||||
|
@ -94,6 +94,8 @@ const InpaintingCanvas = () => {
|
|||||||
dispatch(clearImageToInpaint());
|
dispatch(clearImageToInpaint());
|
||||||
};
|
};
|
||||||
image.src = imageToInpaint.url;
|
image.src = imageToInpaint.url;
|
||||||
|
} else {
|
||||||
|
setCanvasBgImage(null)
|
||||||
}
|
}
|
||||||
}, [imageToInpaint, dispatch, stageScale, toast]);
|
}, [imageToInpaint, dispatch, stageScale, toast]);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user