mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2024-12-23 23:49:11 +01:00
Fix the restoration of the inpainting toggle
The Inpainting toggle doesn't get restored at the very first attempt. Repro steps: 1. Create a task with a source image and enable the inpainting toggle. 2. Copy the task to the clipboard 3. Refresh the page (F5) 4. Paste the task from the clipboard Expected result: The task gets restored and the toggle is ON. Actual result: The task is restored, but the toggle is OFF. To fix that, we have to restore the toggle's state after loading the source image.
This commit is contained in:
parent
f733b53c25
commit
e6ec7393c6
@ -357,6 +357,7 @@ function restoreTaskToUI(task, fieldsToSkip) {
|
||||
initImagePreview.addEventListener('load', function() {
|
||||
if (Boolean(task.reqBody.mask)) {
|
||||
imageInpainter.setImg(task.reqBody.mask)
|
||||
maskSetting.checked = true
|
||||
}
|
||||
}, { once: true })
|
||||
initImagePreview.src = task.reqBody.init_image
|
||||
|
Loading…
Reference in New Issue
Block a user