Skip to content

Sprite tiles can display out-of-date costumes #5777

@adroitwhiz

Description

@adroitwhiz

Expected Behavior

Sprite tiles should, given a second or two, display the sprite's latest costume

Actual Behavior

If you quickly undo/redo in the paint editor, the sprite selector tiles will display the old costume until you hover over them with your mouse:
image

This appears to be a consequence of the ThrottledPropertyHOC: it limits a sprite tile's costume to be changed at most once every 500ms, but if you change it more often than that, it "throws away" all later changes.

Steps to Reproduce

  1. With the editor open, switch to the Costumes tab
  2. Scribble over the cat's costume with the paintbrush or otherwise make a visible change to it
  3. Observe the sprite tile changing
  4. Quickly (within half a second) undo and then redo in the paint editor
  5. Observe that the sprite tile now shows the original unmodified sprite

This also happens if you rapidly click the undo button in the paint editor.

Operating System and Browser

All

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions