lunapaint / vscode-luna-paint

A raster image editor extension for VS Code
https://marketplace.visualstudio.com/items?itemName=Tyriar.luna-paint
282 stars 27 forks source link

undo, expand canvas to selection, shows overlay at canvas bottom #57

Closed duianto closed 3 years ago

duianto commented 3 years ago

Undoing an Expand canvas to selection action, shows an overlay at the bottom of the image.

Reproduction steps:

  1. open an image
  2. draw a selection
  3. activate the move selection tool
  4. drag part of the selection, outside an image corner
  5. activate the move pixels tool
  6. click the top toolbar button: Expand canvas to selection
  7. undo the expansion: either by clicking the previous item in the history window or by pressing: ctrl z

observed:

The bottom of the image shows an overlay at the bottom of the canvas.

expected:

The image shouldn't have a copy of the image that covers the bottom of the image.

The overlay doesn't seem to be part of the image, because when the image is moved:

  1. choose the selection tool
  2. click outside the selection to deselect it
  3. activate the move pixels tool
  4. drag the image

observed:

Now the overlay at the bottom remains at the bottom of the canvas.

The dragged image is shown above the overlay, but when the move selected pixel action is undone, then the overlay appears above the image again.

expand_canvas_to_selection

note:

When the selection is dragged outside the bottom right corner, then the overlay isn't visible at the bottom, because it isn't offset. But the overlay can be seen when the image is dragged.

system:

luna 0.5.0 vscode 1.56.0 windows 10 version 2004

duianto commented 3 years ago

A selection doesn't have to be drawn first, the image can be dragged directly past a canvas corner.

Pressing the Expand canvas to selection button and undoing both actions: Image: Expand Canvas to Selection Move Selected Pixels

Shows a transparent overlay at the bottom of the canvas.

expand_canvas_to_selection_2

Tyriar commented 3 years ago

This is a rendering bug, I think I've seen something similar when cropping a large image where the bottom portion is rendered incorrectly but the underlying model seems correct.