zero01101 / openOutpaint

local offline javascript and html canvas outpainting gizmo for stable diffusion webUI API 🐠
MIT License
509 stars 45 forks source link

[Bug]: Transform Tool Erase is not saving to history. #281

Open Delerium opened 10 months ago

Delerium commented 10 months ago

What happened?

Transform Tool Erase is not saving to history when selecting portions of an image and deleting them with the delete button.

Steps to reproduce the problem

  1. With an image loaded, go to (S) Select Image.
  2. Drag over an area of the image and press the Delete key.
  3. Portion of image is deleted, but nothing appears in history.
  4. Click on "Save Workspace", notice that the area you have deleted comes back.
  5. To test how it should work, drag over an area and move it somewhere else.
  6. Notice that in the history, "Transform Tool Erase" and "Transform Tool Apply" shows up.

What should have happened?

The "Transform Tool Erase" should be showing up when deleting as well as when moving selections.

Commit where the problem happens

zero01101/openOutpaint@7de3a26, zero01101/openOutpaint-webUI-extension@522c187

What platforms do you use to access openOutpaint?

Windows

What browsers do you use to access the UI ?

Mozilla Firefox

Browser Extensions/Addons

none

AUTOMATIC1111 webUI Commandline Arguments

--medvram --opt-sdp-attention --api

Additional information

No response

zero01101 commented 10 months ago

sorry for the delay - so you've definitely come across a bug, but not the one you think lol

so the selection tool isn't exactly like photoshop's, i.e. you don't need to select a region to delete first - to remove pixels, you'd simply right-click over the region you want to erase using the dream (txt2img) or img2img tool directly.

the (DEL) key shortcut is for removing any drawn masks you've put over the image, not any actual image content... however, the fact that (DEL) does remove image content should not be happening, so i'm definitely going to have to figure out what happened there... guessing the wrong canvas is being used for selection operation...