-
Notifications
You must be signed in to change notification settings - Fork 349
Closed
Labels
Description
Expected Behavior
When the user clicks a costume in the paint editor, the sprite's bounds should always be updated to match the costume.
Actual Behavior
When the user clicks a costume in the paint editor, the sprite's bounds are updated to match the costume ONLY if the new costume's width and height are both non-zero.
Steps to Reproduce
- Create or edit a project which uses the pen extension
- Make a sprite with at least two costumes:
- One with a perfectly vertical or horizontal line, which due to Vector vertical and horizontal line costumes not showing on stage #434 will get a 1x1 ImageData object internally.
- One "normal" costume where width and height are both non-zero
- Move the rotation center outside the costume for the "normal" costume
- Activate the "normal" costume and use
pen down
andgo to random position
to see fencing behavior - While the project is running, switch to the other costume.
Expected: the sprite (Drawable) is fenced according to the new 1x1 ImageData
Actual: the sprite (Drawable) is fenced according to the previous "good" costume
The problem goes away after using the paint editor to adjust the rotation center of the zero-width / zero-height costume.
Example (thanks @fsih!)