Skip to content

Fix issue where you couldn't add sprites from backpack when there are no sprites #4354

Merged
kchadha merged 1 commit intoscratchfoundation:developfrom
paulkaplan:fix-backpack-sprite
Jan 16, 2019
Merged

Fix issue where you couldn't add sprites from backpack when there are no sprites #4354
kchadha merged 1 commit intoscratchfoundation:developfrom
paulkaplan:fix-backpack-sprite

Conversation

@paulkaplan
Copy link
Contributor

Fixes an issue where you could not drop a sprite from the backpack if there were no sprites in the list. Same applied for sounds if there were no sounds.

This is used because the sortable drop is also used for general dropping as well as sorting drop, so you need to be able to drop into a sortable list that does not contain any items.

Make the corresponding reorder code be more careful to check if there is a newIndex.

Resolves

What Github issue does this resolve (please include link)?

This is used because the sortable drop is also used for general dropping as well as sorting drop, so you need to be able to drop into a sortable list that does not contain any items.

Make the corresponding reorder code be more careful to check if there is a newIndex.
@paulkaplan paulkaplan requested a review from kchadha January 15, 2019 17:44
@thisandagain thisandagain added this to the January 2019 milestone Jan 15, 2019
@paulkaplan paulkaplan changed the title Allow drop event in sortableHOC even when there are no items to sort. Fix issue where you couldn't add sprites from backpack when there are no sprites Jan 15, 2019
Copy link
Contributor

@kchadha kchadha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kchadha kchadha merged commit 97f8eb6 into scratchfoundation:develop Jan 16, 2019
paulkaplan added a commit to paulkaplan/scratch-gui that referenced this pull request Jan 18, 2019
…-backpack-sprite"

This reverts commit 97f8eb6, reversing
changes made to 2e017f0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

You can't add a sprite from the backpack if there are no sprites in the project already

3 participants