Skip to content

Fix flipbook selection preview offsets - #3842

Merged
JannisX11 merged 1 commit into
JannisX11:patchfrom
snowyukitty:fix/flipbook-selection-preview
Oct 23, 2026
Merged

JannisX11 merged 1 commit into
JannisX11:patchfrom
snowyukitty:fix/flipbook-selection-preview

Conversation

@snowyukitty

Copy link
Copy Markdown

Fixes #3079.

Selection previews must remove the current frame's height before converting texture coordinates to display pixels. Using the texture width instead offsets rectangle/ellipse previews and layer transform handles on non-square frames. The lasso path and its closing marker now remove the same frame offset.

Apply the offset only while the texture is animated, so changing its UV size to match the full image also keeps static previews aligned.

Validation from the repository root:

  • npm run build-web
  • npm run build-electron
  • npm run generate-types

Browser automation in Chromium covered rectangle, ellipse and lasso selections on 16x16, 16x32 and 32x16 frames, at the first, second and fifth frames; final selected pixels; layer handles at two zoom levels; undo/redo of selection-to-layer; and changing an animated texture to static. Native desktop execution was not tested.

To reproduce: create a 16x32 image, use Image > Resize to keep that frame size with five animation frames, then select the second frame and drag a selection. Repeat with 32x16 frames. The live outline should follow the pointer and agree with the selection after release.

@JannisX11
JannisX11 merged commit 0b6ec8d into JannisX11:patch Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants