fix tileset duplicate and rendering of gallery tiles #10924
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixes microsoft/pxt-arcade#6943
in order to handle loading projects where a tile might not exist, i added a localTile property on the tileset field editor a while ago to hold the selected asset if it wasn't in the current tilemap project (e.g. because of copy/paste or what have you). this local property wasn't getting cleared when an actual tile in the project was selected and was causing duplicate and copy/paste to always use the first selected value, which was transparency.
also fixes the other bug we saw when trying to repro the linked issue where tiles from the gallery were rendering as text rather than as images. the bug here was that blockly requires the alt attribute to be defined in the image object when rendering and the
displayNamefunction doesn't return anything for gallery tiles. as a fix, i'm passing the raw id which is just the qualified name